Skip to content

Conversation

mitya57
Copy link
Collaborator

@mitya57 mitya57 commented Jun 15, 2015

I have got the following bug report privately:

>>> import markdown
>>> from markdown.extensions.smarty import SmartyExtension
>>> md = markdown.Markdown(extensions=[SmartyExtension(smart_angled_quotes=True)])
>>> md.convert("<<hello>>")
'<p>&lt;<hello>&gt;</p>'

(Expected result will be '<p>&laquo;hello&raquo;</p>').

This pull request fixes it. @waylan: I have not pushed it directly because you may know better ways to fix it, than separating the processors. If I just move everything to before inline, then I get the Python-Markdown internals leaking into the resulting HTML.

waylan added a commit that referenced this pull request Jun 15, 2015
Fix processing angle quotes in smarty extension
@waylan waylan merged commit 789f516 into Python-Markdown:master Jun 15, 2015
@waylan
Copy link
Member

waylan commented Jun 15, 2015

Looks fine to me. Thanks.

@mitya57
Copy link
Collaborator Author

mitya57 commented Jun 18, 2015

Oops, now that regex seems to match even text inside code blocks :-(

I will try to look at that in the coming days, in the mean time suggestions on how to fix this are appreciated.

The issue is not that severe because smart_angle_quotes is disabled by default.

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

Successfully merging this pull request may close these issues.

2 participants