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

Problem with html tags in headers #17

Open
Mehran-Baghi opened this issue Jun 30, 2017 · 3 comments
Open

Problem with html tags in headers #17

Mehran-Baghi opened this issue Jun 30, 2017 · 3 comments

Comments

@Mehran-Baghi
Copy link

Mehran-Baghi commented Jun 30, 2017

Hi
There is a problem with adding html tags in a header. For example this headers anchor link wont work:

## <em>something</em>

The reason is that hexo-toc makes different ids for the anchor and the link. In this example it makes a link to #emsomethingem anchor (which does not exist) and on the other hand it makes the #something anchor.

I need to add html tags to add Font Awesome.

@tea3
Copy link

tea3 commented Jul 26, 2017

@Mehran-Baghi
This is probably caused by markdown-toc .
https://github.com/bubkoo/hexo-toc/blob/master/package.json#L33
Why do not you ask questions with markdown-toc ?

Also , if you want to add fontawesome, can you solve it with css ? For example, the following page is helpful.
https://stackoverflow.com/questions/13354578/custom-li-list-style-with-font-awesome-icon

@Mehran-Baghi
Copy link
Author

Hello @tea3
Thank you for your comment. You're right it's probably a bug of markdown-toc.

And that stackoverflow post doesn't solve my problem. I have added font-awesome to my site but I want to have hexo-toc generate my toc correctly with html tags included.

By the way you're a great photographer 👌

@tea3
Copy link

tea3 commented Jul 27, 2017

Thank you , I'm glad you like it : )

I have added font-awesome to my site but I want to have hexo-toc generate my toc correctly with html tags included.

I see . I think that markdown-toc doesn't assume such usage. I recommend that you request for markdown-toc to escape html tag .

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

No branches or pull requests

2 participants