diff --git a/lib/markdown2.py b/lib/markdown2.py index f64f5551..534812bb 100755 --- a/lib/markdown2.py +++ b/lib/markdown2.py @@ -1981,6 +1981,13 @@ def _do_smart_punctuation(self, text): text = text.replace("...", "…") text = text.replace(" . . . ", "…") text = text.replace(". . .", "…") + + # TODO: See issue #150 + if "footnotes" in self.extras and "footnote-ref" in text: + # Quotes in the footnote back ref get converted to "smart" quotes + # Change them back here to ensure they work. + text = text.replace('class="footnote-ref”', 'class="footnote-ref"') + return text _block_quote_base = r''' diff --git a/test/tm-cases/footnotes_smarty-pants.html b/test/tm-cases/footnotes_smarty-pants.html new file mode 100644 index 00000000..b48e23a6 --- /dev/null +++ b/test/tm-cases/footnotes_smarty-pants.html @@ -0,0 +1,14 @@ +
This is a para with a footnote.1
+ +Here is the body of the footnote.
+ +