Skip to content
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

Pre-rendered links break Markdown links #69

Closed
adam-p opened this issue May 31, 2013 · 1 comment
Closed

Pre-rendered links break Markdown links #69

adam-p opened this issue May 31, 2013 · 1 comment

Comments

@adam-p
Copy link
Owner

adam-p commented May 31, 2013

If a pre-rendered link is used at the URL in a Markdown Link, the rendered link will be incorrect.

This...

[Link name](<a href="http://example.com">http://example.com</a>)

...renders to this...

<a href="[http://example.com](http://example.com">Link name</a>)

This does not occur for MD links that use plaintext links. (So that's a workaround, for now.) The problem is almost certainly due to the feature in Markdown Here's where it leaves pre-rendered links intact. (Every time I put in a feature that deviates from the MD spec I break something. But I think this deviation is important, so I'll try to fix this without ripping it out.)

Making this a high priority bug, as it can result in users unknowingly having broken links.

Screenshot from user:
screen shot

(Report from user Mitchell W. via email.)

@adam-p
Copy link
Owner Author

adam-p commented Jun 5, 2013

Fixed in rev 2a8ceea. Will be in next release.

As predicted, the problem was due to the feature where pre-formatted links are retained during rendering (per issue #49). It was implemented too simplistically and was retaining pre-formatted links that were inside Markdown links. Which made stuff break.

Limitation on the fix: Pre-formatted links inside square brackets ([]) are not retained. I think that this is an acceptable trade-off.

Tests have been added to help catch regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant