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

TOC: Option to not escape underscores in SCREAMING_SNAKE_CASE #1466

Open
RandyTidd opened this issue Sep 26, 2024 · 0 comments
Open

TOC: Option to not escape underscores in SCREAMING_SNAKE_CASE #1466

RandyTidd opened this issue Sep 26, 2024 · 0 comments

Comments

@RandyTidd
Copy link

Proposal

The table of contents generator adds escape characters to underscores in the middle of SCREAMING_SNAKE_CASE identifiers. I see that underscores may be backslash escaped, but do they have to be in this case where there is no preceding or following whitespace? Admittedly, my read of CommonMark is naive.

If they are unnecessary, I'd love to have them excluded by default or with an option to improve readability of the markdown source.

Markdown source w/ generated TOC:

# SCREAMING_SNAKE_CASE_EXAMPLE

- [SCREAMING\_SNAKE\_CASE\_EXAMPLE](#screaming_snake_case_example)
  - [H2\_NAME\_ONE](#h2_name_one)
    - [H3\_NAME\_ONE](#h3_name_one)

## H2_NAME_ONE

### H3_NAME_ONE

VS Code Preview:
image

Other information

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