Direct insert not working on Linux Mint
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 38/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Shell
- Stars
- 3.3k
- Forks
- 2.7k
- Avg merge
- 20m
- Merged PRs (30d)
- 7
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ekalinin/github-markdown-toc
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
ekalinin/github-markdown-toc#176 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ekalinin/github-markdown-toc#165 ·
-
[Feature] `--no-code-tag-removal` flag allowing to make removal of backticks in TOC entries optionalOpenenhancement
Difficulty 3/5 1-2 days Newbie friendliness 58/100
ekalinin/github-markdown-toc#153 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
ekalinin/github-markdown-toc#152 · 1 reaction ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
ekalinin/github-markdown-toc#141 ·
All issues in ekalinin/github-markdown-toc
Similar issues
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oSoWoSo/vOid_Community_repOsitory#207 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
alunduil/alunduil-chezmoi#815 ·
Maintainers usually reply within 1 day
-
good first issue new package
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wimpysworld/deb-get#2035 ·
Maintainers usually reply within 1 day
-
automation documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
termux/termux-packages#32085 ·
Maintainers usually reply within 1 day