-
Notifications
You must be signed in to change notification settings - Fork 862
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
"Unterminated character set" exception when using extra extension #1444
Comments
Thanks for the report. This appears to be an issue with the Obviously, the carrot ( We have a few options to address this:
Option 3 would be simple in that it would mostly eliminate the possibility of special characters being used in generated regex . But it could break users' existing documents as the current permissive approach has been in-place for over a decade. And I say it would only "mostly eliminate" the issue because we would likely want to allow
|
On second thought, we could go with option 3 and restrict abbreviations to not allow them to include the 3 characters Finally, I will note that while the |
I am rather opposed to the chosen solution, on two fronts:
|
I will note that there is no change in behavior, which is why I took this route. I simply pushed a bug fix which maintains the existing behavior. Specifically, the change prevents an error from being raised. So the change stands.
Apparently, way back when I first wrote this extension, I didn't realize that |
A alternate fix to Python-Markdown#1444. This does not omit the use of carrots in abbreviations. It still omits backslashs, however. I played around with backslashes and it just doesn't make sense to support them as they have special meaning in the Markdown, not because of their use in regular expressions.
I just pushed #1449. It still doesn't allow backslashes, but because of their meaning in Markdown, not due to the regex implementation. |
Nice, thanks! |
A alternate fix to #1444. This does not exclude the use of carrots or square brackets in abbreviations. It still excludes backslashse, however. I played with backslashes and it just doesn't make sense to support them as they have special meaning in the Markdown, not because of their use in regular expressions.
Hi,
When using the "extra" extensions, some invalid markdowns (i think?) are causing exceptions rather than returning plaintext line.
Example:
Is this expected behavior?
Full exception stack trace:
The text was updated successfully, but these errors were encountered: