Skip to content

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

Open
@Kristinita

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions