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

orderedList=true setting bug: link prefix auto-numbering in TOC not in header refs #10

Open
datocrats-org opened this issue Oct 21, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@datocrats-org
Copy link

datocrats-org commented Oct 21, 2019

When markdown-toc.orderedList=true the TOC link includes a prefix that prior fork did not. Conversely the anchor links that are added omit the prefix matching the TOC's generated list number. It should probably just add the numbered list as a style for the TOC only, and all links and section header titles should instead show #section-H1 for either markdown-toc.orderedList=true or markdown-toc.orderedList=false

currently

<!-- TOC -->

1 [Section H1](#1-section-h1)
    1.1 [Section H2](#1-1section-h2)

<!-- /TOC -->

# Section H1
<a id="markdown-section-h1" name="section-h1"></a>

some text
## Section H2
<a id="markdown-section-h2" name="section-h2"></a>
some text

should be

<!-- TOC -->

1 [Section H1](#section-h1)
    1.1 [Section H2](#section-h2)

<!-- /TOC -->

# Section H1
<a id="markdown-section-h1" name="section-h1"></a>

some text
## Section H2
<a id="markdown-section-h2" name="section-h2"></a>
some text
@datocrats-org datocrats-org changed the title Numbered list orderedList=true adding prefixes in TOC (#) missing at heading anchor <href> Oct 21, 2019
@datocrats-org datocrats-org changed the title orderedList=true adding prefixes in TOC (#) missing at heading anchor <href> orderedList=true setting link prefix auto-numbering in TOC not in header refs Oct 21, 2019
@datocrats-org datocrats-org changed the title orderedList=true setting link prefix auto-numbering in TOC not in header refs orderedList=true setting bug: link prefix auto-numbering in TOC not in header refs Oct 21, 2019
@huntertran huntertran added the bug Something isn't working label Nov 3, 2019
@huntertran
Copy link
Owner

thanks for letting me now. Will investigate when i have time. Contribute welcome 😄

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