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

Do not replace the leading digit of the anchor link #895

Closed
1 task done
bgpat opened this issue Aug 6, 2019 · 3 comments · Fixed by #896
Closed
1 task done

Do not replace the leading digit of the anchor link #895

bgpat opened this issue Aug 6, 2019 · 3 comments · Fixed by #896
Labels
wait for information something is not clear, waiting for the author of the issue/pr wontfix

Comments

@bgpat
Copy link
Contributor

bgpat commented Aug 6, 2019

Bug Report

Steps to reproduce

Create link.md, and start the dev srerver.

link.md
# 1. one

111

# 2. two

222

# 3. three

333

What is current behaviour

Docsify adds _ into between # and the leading digit.

image

What is the expected behaviour

I expect that it doesn't add like GitHub's parser.

image


GitHub's markdown parser:

image

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: macOS

  • Node.js version: v11.12.0

  • npm/yarn version: 6.9.0

  • Browser version: Firefox 67.0.4

  • Docsify version: develop branch (1d3246a)

  • Docsify plugins: nothing

@bgpat bgpat mentioned this issue Aug 6, 2019
19 tasks
@anikethsaha
Copy link
Member

Are you facing any issue having _ in front?

If yes, then we can consider it as a bug after reviewing.
Else I don't think it is causing if works fine and it's just a different approach to solving a problem.

@anikethsaha anikethsaha added the wait for information something is not clear, waiting for the author of the issue/pr label Nov 24, 2019
@bgpat
Copy link
Contributor Author

bgpat commented Nov 24, 2019

Are you facing any issue having _ in front?

The fragment link which starts of _ and works on GitHub's Markdown parser doesn't work through Docsify. I faced this problem in creating the TOC to numbered heading block, e.g., ## 1. foo or ## 2. bar.

@stale
Copy link

stale bot commented Feb 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 4, 2020
anikethsaha pushed a commit that referenced this issue Feb 5, 2020
* Don't replace leading digit

* Install css.escape

* Escape leading digit of the anchor id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wait for information something is not clear, waiting for the author of the issue/pr wontfix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants