Direct insert not working on Linux Mint
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
Start at the ./gh-md-toc entry point, search for the grep condition that checks the and markers, and inspect line 178 where no_backup is tested. Verify the --insert path against a README.md containing both markers, then exercise the no-backup option and confirm neither shell error occurs.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I was using the direct insert flag --insert to directly insert the TOC into the readme.md. I've added the two lines
<!--ts-->
<!--te-->
into the readme but when running the script with the --insert flag I get the output:
You don't have <!--ts--> or <!--te--> in your file...exiting
I've found the part in the script that does the search for the tags
if grep -Fxq "<!--ts-->" $gh_src && grep -Fxq "<!--te-->" $gh_src; then
which seems to fail. I've run the command manually on Linux Mint 19
grep -Fxq "<!--ts-->" Readme.md
and I get the error
bash: !-: event not found
For my workaround I had to escape the syntax to this form
if grep -xq "<\!--ts-->" $gh_src && grep -xq "<\!--te-->" $gh_src; then
Line 178 returns the following error
./gh-md-toc: line 178: [: =: unary operator expected```
should probably be changed to
if [ "$no_backup" = "yes" ]; then
- Ngôn ngữ chính
- Shell
- Star
- 3.3k
- Fork
- 2.7k
- Merge trung bình
- 20 phút
- Pull request đã merge (30 ngày)
- 7
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
-
Update bats version in CIĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
ekalinin/github-markdown-toc#176 ·
-
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 ·
-
[Feature] `--no-code-tag-removal` flag allowing to make removal of backticks in TOC entries optionalĐang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
ekalinin/github-markdown-toc#153 ·
-
Độ 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 ·
Tất cả issue của ekalinin/github-markdown-toc
Issue tương tự
-
Bug: pane path not quotedĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
-
Does a subagent definition's `tools:` bypass the permission check? One default-permission cellĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pearu/agent-sandbox#156 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/documentation squad/marvin
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
rancher/stackstate-product-docs#443 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Request: Remove Sikka appĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
getumbrel/umbrel-apps#6142 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
agentscope-ai/agentscope#3030 ·
Maintainer thường phản hồi trong vòng 1 ngày