-
Notifications
You must be signed in to change notification settings - Fork 155
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
Invalid HTML with --fpermissive-url-autolinks #53
Labels
Comments
Thanks, will take a look at it. |
Interesting. The bug depends on the char just after the link. When dot follows:
When a letter follows, it's broken in a different way:
And when space or EOF follows, it works correctly:
|
With permissive WWW autolinks, there is the same issue:
|
ec1oud
pushed a commit
to ec1oud/md4c
that referenced
this issue
Apr 17, 2019
The issues is caused by the fact that we do not know exact position of permissive auto-link in time of md_collect_marks() because there is no syntax to mark its end on the 1st place. This causes that eventually, the closer mark in ctx->marks[] can be out-of-order somewhat. As a consequence, if some other mark range (e.g. ordinary link) shadows the auto-link, the closer mark may be left outside the shadowed range and survive till the phase when we generate the output. We fix by using an extra mark flag to remember we did really output the opener mark, and output the closer only in such case. Fixes mity#53.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With permissive-url-autolinks enabled, md2html appears to generate an extra closing tag after an ordinary inline link.
The text was updated successfully, but these errors were encountered: