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

Footnotes inside headers not working #262

Closed
1manfactory opened this issue Jan 3, 2017 · 1 comment
Closed

Footnotes inside headers not working #262

1manfactory opened this issue Jan 3, 2017 · 1 comment

Comments

@1manfactory
Copy link

PHP Markdown Lib 1.6.0 - 23 Dec 2015

I don't know if this has never been tested before or if this is not a desirable issue at all.

When I place footnotes inside headers they are not translated into html.

# Header [^1]
Text
[^1]: Footnote

Should be transformed into something like

<h1>Header</h1><sup id="fnref:1><a href="#fn:1>1</a></sup>
Text
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">
Footnote <a href="#fnref:1" class="footnote-backref">&#8617;&#xFE0E;</a></p>
</li>
</ol>
</div>

Instead I get

<h1>Header [^1]</h1>
<p>Text</p>
</p>[^1]: Footnote</p>

Any idea what can be done about this?

Thank you very much in advance to taking your valuable time to investigate my sometimes niggling issues. I really appreciate it.

Juergen

@1manfactory
Copy link
Author

STOP

Sorry, this was my mistake.

I accidentally replaced the second [ with a broken value due to a greedy regex. Hence your parser never got the chance to work right.

@michelf michelf closed this as completed Mar 30, 2018
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