[Feature] `--no-code-tag-removal` flag allowing to make removal of backticks in TOC entries optional
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/100
Hướng nghiên cứu
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``.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Shell
- Star
- 3.3k
- Fork
- 2.7k
- Merge trung bình
- 7 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ekalinin/github-markdown-toc
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
ekalinin/github-markdown-toc#167 ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
ekalinin/github-markdown-toc#165 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
ekalinin/github-markdown-toc#152 · 1 reaction ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
ekalinin/github-markdown-toc#141 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
ekalinin/github-markdown-toc#139 ·
Tất cả issue của ekalinin/github-markdown-toc
Issue tương tự
-
Update cliamp to 2.3.0Đang mởpackage-update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
oSoWoSo/vOid_Community_repOsitory#203 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] v-quick-install-app install crashes with ValueError if no supported PHP version is installedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
chore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
alunduil/alunduil-chezmoi#809 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
catppuccin/kde#152 ·