Skip to content

Conversation

mitya57
Copy link
Collaborator

@mitya57 mitya57 commented Jun 19, 2015

Just update HTML_RE so that it doesn't act on <<...>>.

mitya57 added 2 commits June 19, 2015 14:54
That commit caused a regression where `<<` and `>>` inside code
blocks were wrongly replaced with double quotes.

This reverts commit 5029d82.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a sensible approach when the smarty extension is in use, but the default behavior should not be changed when smarty is not enabled. I would expect that the smarty extension would replace the HTML pattern with a new one if angle quotes are enabled. Otherwise, leave it unchanged.

And we should have a test for each state (enabled and not enabled). The not enabled state should return the same results as we would get without smarty before this patch was applied.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is <foo>> really a valid HTML tag?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, of course not. But the parser is not concerned with whether raw HTML is "valid". Without smarty's angle quotes enabled, I expect the same default behavuor we have now: <foo>> becomes <foo>&gt;.

@mitya57
Copy link
Collaborator Author

mitya57 commented Jun 20, 2015

@waylan I have now updated the pull request as you suggested.

mitya57 added 2 commits June 20, 2015 16:00
Add a restriction that the closing angled quote should not be duplicate,
so that we can use our own pattern for handling duplicate quotes.
waylan added a commit that referenced this pull request Jun 20, 2015
Use a different approach to fix the smarty bug
@waylan waylan merged commit 904d4e6 into Python-Markdown:master Jun 20, 2015
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