Pre-existing bugs found while reviewing #151
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
Línea de trabajo
The five bugs sit in gh-md-toc: the HTTP status check in gh_toc_load (around L38), the stdin read loop (L421-425), the error output (L160-171), and the single-line sed in gh_toc_grab (L290). The issue says to wait for #151, which changes the stdin block and error output, so check that PR first. Done means each checkbox is fixed and reproduced on both Linux and macOS, with the issue's examples giving the expected output.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Found while reviewing #151. All of these reproduce on current master (9e0a858), #151 doesn't introduce them. Line numbers refer to gh-md-toc at 9e0a858.
- Remote URL ignores the HTTP status (
gh_toc_load, L38).curl -sonly fails on network errors, so./gh-md-toc https://github.com/ekalinin/github-markdown-toc/blob/master/NOPE-404.mdprints an empty TOC and exits 0. - stdin input is changed before it is sent (L423-425).
while read -r input; do echo "$input" >> ...strips leading whitespace, drops a last line without a trailing newline, andechoswallows lines like-n. Forprintf '# A\n\n # indented code\n-n\n# Last' | ./gh-md-toc -the API gets only# A, an empty line and# indented code, so the indented code block becomes a heading and# Lastis lost.cat > "$gh_tmp_md"would keep the input as is. - The stdin temp file is never removed (L421). Every
gh-md-toc -run leaves atmp.XXXXXXfile with the input markdown in$TMPDIR. - Errors go to stdout (L160-171). The network and rate-limit errors are printed with plain
echo, so./gh-md-toc README.md > toc.mdwrites the error text intotoc.mdunder the "Table of Contents" header. The exit code is 1, but the error ends up in the output file. - The rate-limit hint always points to
token.txt(L168-169). It's printed even whenGH_TOC_TOKENis set, and in that casetoken.txtis ignored. - Single-line HTML gives an empty TOC on macOS (
gh_toc_grab, L290). BSD sed'sNon the last line quits without printing, sosed -e ':a' -e 'N' -e '$!ba' ...outputs nothing for one-line input. A document with only one heading renders to one line of HTML, soprintf '# A\n' | ./gh-md-toc -prints an empty TOC on macOS, whileprintf '# A\n\n## B\n'works.
#151 changes the stdin block and the error output, so it's easier to fix these after it's merged.
- Lenguaje dominante
- Shell
- Estrellas
- 3.3k
- Forks
- 2.7k
- Merge medio
- 3 h 21 min
- PR fusionados (30 d)
- 10
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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ekalinin/github-markdown-toc
-
Update bats version in CIAbierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
ekalinin/github-markdown-toc#176 ·
Los mantenedores suelen responder en 1 día
-
Update outdated examples and versions in READMEPosiblemente ocupada @SatvikMishra08 la tomó hace 24 días. Abiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
ekalinin/github-markdown-toc#165 ·
Los mantenedores suelen responder en 1 día
-
[Feature] `--no-code-tag-removal` flag allowing to make removal of backticks in TOC entries optionalPosiblemente ocupada @jofas la tomó hace 807 días. Abiertoenhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
ekalinin/github-markdown-toc#153 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
ekalinin/github-markdown-toc#152 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
ekalinin/github-markdown-toc#141 ·
Los mantenedores suelen responder en 1 día
Todos los issues de ekalinin/github-markdown-toc
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
bug github_actions security
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
DewaldOosthuizen/tech-cheat-sheets-and-notes#388 ·
Los mantenedores suelen responder en 1 día
-
priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
melodic-software/claude-code-plugins#8831 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Transparent bar text colour falls back to theme colour on animated GIFs and very dark backgroundsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 2 días