Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Link parsing in latest version #236

Closed
dkarzon opened this issue Apr 12, 2015 · 5 comments · Fixed by #239
Closed

Link parsing in latest version #236

dkarzon opened this issue Apr 12, 2015 · 5 comments · Fixed by #239

Comments

@dkarzon
Copy link
Contributor

dkarzon commented Apr 12, 2015

After updating to the latest version (previously on a build from over a year ago) I am having an issue with link parsing. Not sure if it's a problem with Pretzel or dotliquid and it doesn't seem to affect all links on the page, only certain ones. Currently using v0.2.1.127 from AppVeyor, older version doesn't have a proper version in the file properties.

This is the html in my post

<a href="https://www.jetbrains.com/teamcity/">Team City</a>

And this is what gets outputted by Pretzel

<a href="a%20href=%22https://www.jetbrains.com/teamcity/%22">a href=&quot;https://www.jetbrains.com/teamcity/&quot;</a>Team City</a>

Here is a quick sample to show the problem, simple layout structure and a single post.
https://www.dropbox.com/s/lmpvx9ktigqc2p6/PretzelTest.zip?dl=0

@laedit laedit added the Bug label Apr 13, 2015
@laedit
Copy link
Member

laedit commented Apr 13, 2015

Nice catch, I will look into that.
Does this occurs only with the links in the first paragraph?

@dkarzon
Copy link
Contributor Author

dkarzon commented Apr 13, 2015

In that sample yes, I did have it happen in other places on different posts. At the moment my fix for it was to wrap the first paragraph in a <p>

@laedit
Copy link
Member

laedit commented Apr 15, 2015

Quick fix: since you doesn't use markdown but pure html, just change the extension of your post file to html.
I think the problem comes from the change of markdown engine but I haven't got the time to verify it.

@laedit
Copy link
Member

laedit commented Apr 22, 2015

I can confirm that it's coming from the new markdown engine, but I don't consider it a bug: your file is an html one and so had to have the html extension and not md since it has no interest to be transformed from markdown to html.

But will you be interested by the possibility of changing the markdown engine?
Since your are not the only one (#237) I think it's something that we can add.

@laedit laedit added Discussion and removed Bug labels Apr 22, 2015
@dkarzon
Copy link
Contributor Author

dkarzon commented Apr 23, 2015

@laedit I just tested this with the latest version of CommonMark.NET and the issue is gone. See the commit with the fix Knagis/CommonMark.NET@99c0d7e

PR submited.

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

Successfully merging a pull request may close this issue.

2 participants