[Feature] `--no-code-tag-removal` flag allowing to make removal of backticks in TOC entries optional
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
Start at the gh-md-toc logic around line 280 referenced in the issue, then trace how CLI flags are parsed and how generated TOC entries are formatted. Add the optional flag so code tags remain when requested, while preserving the current default behavior; verify the output for a heading such as # Headline``.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem? Please describe.
CI in one of my projects started failing, because the generated TOC entries did not contain backticks. I.e. a headline:
# `Headline`
becomes a TOC entry
* [Headline](#headline)
Note the missing backticks ` in the generated TOC entry. My linter didn't like that and started failing CI.
Describe the solution you'd like
I'd like to have the option to generate a TOC entry:
* [`Headline`](#headline)
with the backticks present.
For this I propose a new CLI flag --no-code-tag-removal that when present disables the current logic removing the generated <code> and </code> tags and instead replaces them with a backtick again.
Describe alternatives you've considered
-
Reverting parts of 1056956, namely this line:
While I believe this was a rather arbitrary change of logic in response to #13, it would still be a breaking change just to revert it. There might be users that want backticks to be removed from the TOC.
-
Adding a flag
--remove-code-tags.While I find
--remove-code-tagsto be a better name than--no-code-tag-removal, it would reverse the logic of code tag removal and become a breaking change again, just like the first considered alternative. I.e. now the default is that backticks are removed. The proposed--no-code-tag-removalflag would change that, add backticks to the generated TOC entries again.--remove-code-tagswould be the opposite, make code tags in the output the default (breaking change), allowing the user to opt out of this.
- Lingua principale
- Shell
- Stelle
- 3.3k
- Fork
- 2.7k
- Merge medio
- 7m
- PR unite (30g)
- 3
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ekalinin/github-markdown-toc
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
ekalinin/github-markdown-toc#167 ·
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ekalinin/github-markdown-toc#165 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
ekalinin/github-markdown-toc#152 · 1 reazione ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
ekalinin/github-markdown-toc#141 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
ekalinin/github-markdown-toc#139 ·
Tutte le issue di ekalinin/github-markdown-toc
Issue simili
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
catppuccin/kde#152 ·
-
update-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
msys2/MINGW-packages#32008 ·
I maintainer di solito rispondono entro 1 giorno
-
bot-found bug priority: P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
madenvel/KalinkaPlayer#179 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100