Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footnote references must be treated as paragraphs #11

Closed
andrewheiss opened this issue Jan 25, 2010 · 1 comment
Closed

Footnote references must be treated as paragraphs #11

andrewheiss opened this issue Jan 25, 2010 · 1 comment

Comments

@andrewheiss
Copy link

I'm not sure if this is a feature or a bug…

When using links in reference-style, list mode, each link only needs to be separated by one newline, like so:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna[^2] aliqua. Ut enim ad minim [veniam][test1], quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla [pariatur][test2]. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

[test1]: www.example1.com
[test2]: www.example2.com

However, when using footnotes, which follow a similar markup pattern, each footnote needs to be separated by a blank line, otherwise all footnotes are grouped together in the same note when converted to HTML. For example, in this paragraph

Lorem ipsum[^1] [dolor][test3] sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna[^2] aliqua. Ut enim ad minim [veniam][test1], quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla [pariatur][test2]. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

This reference list fails and includes both the second footnote and the third link in the text of the first:

[test1]: www.example1.com
[test2]: www.example2.com
[^1]: This is a footnote  
[^2]: This is another footnote
[test3]: www.example3.com

Where as this doesn't fail and works correctly:

[test1]: www.example1.com
[test2]: www.example2.com

[^1]: This is a footnote 

[^2]: This is another footnote

[test3]: www.example3.com

I understand that footnotes are a special case (that don't actually exist in real HTML), and that you can expectedly have multiple paragraphs or other HTML elements in a footnote definition (while you can only have a URL and an optional title in link definitions)

Would it be possible in the footnote parsing functions, though, to remove the need for the newlines, perhaps by checking for a [^x]:, since it shouldn't be possible to include a footnote inside a footnote. It would make the reference-style footnotes act more like the reference-style links and save a lot of unnecessary whitespace.

@fletcher
Copy link
Owner

Since footnotes can contain multiple lines/paragraphs, they need to be separated by blank lines. This is consistent with the behavior of default Markdown for other "paragraph" type elements (lists, blockquotes, etc).

Without a lot of convincing, I don't expect that this will change.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants