-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Allow to generate lower case header references through the config #1310
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
Conversation
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
…ckmdio#1305) This makes the references consistent/compatible with GitHub, GitLab, Pandoc and many other tools. This behavior can be enabled in config.json with: ``` "linkifyHeaderStyle": "gfm" ``` Signed-off-by: hoijui <hoijui.quaero@gmail.com>
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: Yukai Huang <yukaihuangtw@gmail.com> Signed-off-by: hoijui <hoijui.quaero@gmail.com>
thanks @Yukaii , I would not have noticed ;-) |
This comment has been minimized.
This comment has been minimized.
Just now, I actually had a look at how GitHub does it: The way it is done in this pull request comes close, but does not handle the "make ID unique" part. I implemented that part locally, and it works, but .. only when I start with a blank document, and copy&paste in a sample with duplicate headers at once. If I manually start editing around, making the headers sometimes the same, sometimes not, it does not work. It looks like CodiMD handles changes on the fly, and has its own mechanism to prevent equal ids, and that interferes (and is not compatible with any hints on where in the code this is happening? |
Here you are: Lines 897 to 915 in e03a326
|
ok, am trying.. how can I log any debug info? |
@hoijui You can insert |
thanks! :-) |
You can use Line 261 in fd155fa
|
hmm.. it gives me the same order, with and without that sort. sample document:
I want them in the order they appear here, but both:
returns them in this order:
which I guess, is sorted by (header-level/)depth. |
@hoijui I couldn't reproduce in DevTool console, could you share the whole code snippet with me? Something like where did you insert this line. |
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
thank you @Yukaii ! |
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
did that too now |
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LATM!
Awesome, thanks @hoijui |
thanks you two! @Yukaii @jackycute |
resolves #1305
This makes the references consistent/compatible with GitHub,
GitLab, Pandoc and many other tools.
This behavior can be enabled in config.json with: