Direct insert not working on Linux Mint
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Shell
- スター
- 3.3k
- フォーク
- 2.7k
- 平均マージ
- 7分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ekalinin/github-markdown-toc のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
ekalinin/github-markdown-toc#167 ·
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ekalinin/github-markdown-toc#165 ·
-
[Feature] `--no-code-tag-removal` flag allowing to make removal of backticks in TOC entries optionalオープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
ekalinin/github-markdown-toc#153 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
ekalinin/github-markdown-toc#152 · リアクション 1 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
ekalinin/github-markdown-toc#141 ·
ekalinin/github-markdown-toc の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
backlog bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
WLAN-Pi/wlanpi-profiler#306 ·
メンテナーはふだん 1 日以内に返信
-
area: backend good first issue priority: P3 - low size: S type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Mizithra/ActiveTerrain#31 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
obra/superpowers#2422 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ComplianceAsCode/content#15152 ·
メンテナーはふだん 3 日以内に返信