trentm / trentm/python-markdown2
Incorrect HTML when using footnotes and smarty-pants together
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 459
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 4
Description
text = """
foo[^1]
[^1]: bar
"""
markdown2.markdown(text, extras={'footnotes', 'smarty-pants'})
Results in
<p>foo<sup class="footnote-ref” id="fnref-1"><a href="#fn-1">1</a></sup></p>
<div class="footnotes">
<hr />
<ol>
<li id="fn-1">
<p>bar <a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">↩</a></p>
</li>
</ol>
</div>
The quotation mark right before id in the footnote ref is incorrectly converted by smarty-pants to a right quotation mark glyph.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the markdown2.markdown entry point and reproduce the issue with the provided footnotes and smarty-pants example. Trace the generated footnote reference HTML; done means the class attribute remains valid and the quotation mark is not converted into a right-quotation glyph.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- content
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100