Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Direct insert not working on Linux Mint

Abierto
#86 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
shell
Área
cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

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
Lenguaje dominante
Shell
Estrellas
3.3k
Forks
2.7k
Merge medio
20 min
PR fusionados (30 d)
7

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ekalinin/github-markdown-toc

Todos los issues de ekalinin/github-markdown-toc

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.