icyleaf / markd

Yet another markdown parser, Compliant to CommonMark specification, written in Crystal.
MIT License
109 stars 30 forks source link

Toc: finish table of content #41

Closed Nephos closed 2 years ago

Nephos commented 2 years ago

Hi!

I don't exactly know what happened in the past, but I managed to get the toc anchors working. What do you think ?

Nephos commented 2 years ago

image

With a few CSS & font awesome it gives this

Nephos commented 2 years ago

I suppose this is ok since it's just a depreciation warning that is not in 1.1 anyway.

icyleaf commented 2 years ago

It's been a long time since I've maintained this project and I've forgotten the previous logic 😭
I remember that it couldn't generate anchor link well because of the CJK language.

Nephos commented 2 years ago

It generates weird anchors but it works I suppose:

https://wiki.sceptique.eu/pages/-#anchor-%E9%80%9A%E7%94%A8%E8%A7%84%E8%8C%83%E6%B1%89%E5%AD%97%E5%AD%97%E5%85%B8

And yes it seems that I suck at unicode since I replace all non-ancii characters with a dash in the path of my wiki (so it is not a markd bug or else).

image

Nephos commented 2 years ago

I did not updated the readme btw

Nephos commented 2 years ago

Crystal 1.2 out, maybe we can fix this nightly build then ?

icyleaf commented 2 years ago

If you have time to submit a PR, it would be greatly appreciated!