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

feature_request(option): ids of parent headers in repeated ids #144

Open
Kristinita opened this issue Jan 21, 2020 · 0 comments
Open

feature_request(option): ids of parent headers in repeated ids #144

Kristinita opened this issue Jan 21, 2020 · 0 comments

Comments

@Kristinita
Copy link
Contributor

Kristinita commented Jan 21, 2020

1. Summary

It would be nice, if would be implemented an option: adding ids of parent headers for repeated ids instead of numbers (1, 2 and so on).

2. MCVE

2.1. Data

  • KiraExampleTOC.md
# Astronomy

## NotRecommended

# Geography

## NotRecommended

2.2. Steps to reproduce

I move carriage to the beginning of KiraExampleTOC.mdCtrl+Shift+P (⌘⇧p for Mac) → MarkdownTOC: InsertTOC.

2.3. Current behavior

<!-- MarkdownTOC -->

1. [Astronomy](#Astronomy)
    1. [NotRecommended](#NotRecommended)
1. [Geography](#Geography)
    1. [NotRecommended](#NotRecommended-1)

<!-- /MarkdownTOC -->

<a id="Astronomy"></a>
# Astronomy

<a id="NotRecommended"></a>
## NotRecommended

<a id="Geography"></a>
# Geography

<a id="NotRecommended-1"></a>
## NotRecommended

2.4. Expected behavior

<!-- MarkdownTOC -->

1. [Astronomy](#Astronomy)
    1. [NotRecommended](#NotRecommended-Astronomy)
1. [Geography](#Geography)
    1. [NotRecommended](#NotRecommended-Geography)

<!-- /MarkdownTOC -->

<a id="Astronomy"></a>
# Astronomy

<a id="NotRecommended-Astronomy"></a>
## NotRecommended

<a id="Geography"></a>
# Geography

<a id="NotRecommended-Geography"></a>
## NotRecommended

3. Argumentation

This option would be useful for constantly updated files with numerous duplicate headers. My books list (for intellectual gaming practice) — example of such a file.

3.1. Informativity

#NotRecommended-Geography is more informative, sensible id name, than #NotRecommended-1.

3.2. Permalinks

  1. Currently: I share permalink with #NotRecommended-1 → I add another NotRecommended headers to KiraExampleTOC.md#NotRecommended-1 now be #NotRecommended-2 or #NotRecommended-3 → the shared permalink will link to another header.
  2. Expected: #NotRecommended-Geography will not change, if I add another NotRecommended headers to file. Permalink with #NotRecommended-Geography will be permanent.

Thanks.

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

1 participant