Comments (3)
The resulting document just has a literal [^f2] in the text.
Note, a problem with this is it is basically an intended part of commonmark; that square brackets []
are parsed as text, if there are no definitions: commonmark/commonmark-spec#702
footnote references are generally treated in the same way, although perhaps you could make the case that [^
is a more explicit syntax, so that we could remove this "lazy evaluation"; it would be a breaking change for myst, but shouldn't affect too many.
from myst-parser.
Looking at djot, they do indeed always treat [^...]
as a footnote, even if no definition is given: https://djot.net/playground/?text=%5B%5Ea%5D&sourcepos=false
(you'll note in https://github.com/jgm/djot, general shortcut link syntax [...]
is removed)
from myst-parser.
Thinking about this now actually, perhaps a route to removing the annoying "lazy" behaviour of shortcut link references like [...]
for myst, would be to introduce a more "specific" syntax like [=...]
, e.g.
footnote references are never parsed as text [^footnote]
link shortcuts starting with `[=` are never parsed as text (and the `=` is removed from the link) [=reference]
[^footnote]: This is a footnote
[reference]: https://example.com
goes to:
<p>footnote references are never parsed as text <a id="fnref1" href="#fn1"><sup>1</sup></a></p>
<p>link shortcuts starting with <code>[=</code> are never parsed as text (and the <code>=</code> is removed from the link) <a href="https://example.com">reference</a></p>
<section role="doc-endnotes">
<hr>
<ol>
<li id="fn1">
<p>This is a footnote<a href="#fnref1">âŠī¸</a></p>
</li>
</ol>
</section>
from myst-parser.
Related Issues (20)
- Equation label of math not work before `make clean` when math_numfig=True HOT 7
- Support sphinx 7.3 - use default config value types HOT 2
- `end-before` parameter thinks it has no argument HOT 3
- More than one target found for 'myst' cross-reference [myst.xref_ambiguous] HOT 3
- $$ equation reference is not identified unless preceded by a blank line HOT 3
- no syntax to create line_block (hardbreak creates paragraph with raw linebreaks) HOT 4
- `## Heading 2` produces `<h1>Heading 2</h1>` HOT 4
- Issue on page /syntax/admonitions.html - In example, class should be space separated not comma HOT 3
- Include directive does not consider parser option HOT 2
- replacement of "." in headings for slugs HOT 1
- Test regressions with Sphinx 7.3.7 HOT 2
- Missing newline from doc HOT 5
- For v3.0.1: indented directive options no longer recognised HOT 7
- For v3.0.1: If the last directive option has an empty value then it is omitted HOT 5
- Add `:tag:` Option for Custom Equation Numbering in `{math}` Directives HOT 1
- Add example config.yml entries for autodoc-2 HOT 1
- More Complete Info about Auto Documentation HOT 1
- Substitution in Block doesn't seem to work in Live Preview HOT 1
- Executablebooks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from myst-parser.