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

Header as link does work as before #576

Closed
initrc opened this issue Apr 6, 2014 · 3 comments
Closed

Header as link does work as before #576

initrc opened this issue Apr 6, 2014 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@initrc
Copy link

initrc commented Apr 6, 2014

I just upgraded to 2.5.2 on OSX and saw this issue. It worked fine back in 2013/12. Don't know what Hexo version I was using at that time but it should give you an approximate range.

# [Text](link) used to create a header as a link.
Now it parses to Text"><a href=link>Text</a>

Here's a live example.
http://initrc.github.io/2013/12/25/document-similarity/

Thanks!

@ghost
Copy link

ghost commented Apr 8, 2014

I am running into the same issue with hexo v2.5.2. The markdown in question:

### [test](http://example.com)

Using the marked CLI (marked v0.3.2) it results in the correct HTML:

$ echo '### [test](http://example.com)' | marked

<h3 id="-test-http-example-com-">
    <a href="http://example.com">test</a>
</h3>

However, using the same Markdown in hexo generate results in:

<h3 id="<a_href=" target="_blank" example-com"="" http:="">
test">
    <a target="_blank" href="http://example.com">test</a>
</h3>

which displays as

test">test

@ghost
Copy link

ghost commented Apr 8, 2014

Version 2.4.5 does not have this issue.@initrc if you're fine with using an older version of hexo, you can remove the most recent version of hexo, clone the repository, checkout the 2.4.5 version, and set it as your new global executable:

sudo npm remove -g hexo
git clone https://github.com/tommy351/hexo.git
cd hexo
git checkout tags/2.4.5
sudo npm link

You can then confirm that it is using the right version:

hexo version

Your header links should work again when you re-generate your site.

If I get some more time I'll look into the issue more. I just came across this project mere hours ago so I'm not familiar with the code base.

@initrc
Copy link
Author

initrc commented Apr 8, 2014

Thanks @trevorsenior ! V2.4.5 works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants