Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Remote file: first heading is replaced with GitHub page HTML

Fechada
#166 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
68/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
github, shell
Domínio
cli

Direção de pesquisa

Start by reproducing the command against the GitHub README URLs in the issue and trace the remote README handling, including the commented-out “TOC for remote README.md” test. Done means the first heading produces a normal heading anchor and the existing entries remain correct, while wiki-page behavior is unchanged.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

bug

Steps

./gh-md-toc https://github.com/ekalinin/github-markdown-toc/blob/master/README.md

Expected

* [gh-md-toc](#gh-md-toc)
* [Table of contents](#table-of-contents)
...

Actual

The first entry contains GitHub page markup instead of the heading:

   * [<button data-component="Button" type="button" aria-label="Expand file tree" ...
* [Table of contents](#table-of-contents)
...

The line is about 30 KB long, its href points to the repository tree URL
(/<owner>/<repo>/tree/<sha>) instead of the heading anchor, and it is indented
as a second-level entry. The other entries are correct.

Reproduced with gh-md-toc 0.10.0. The same happens for
https://github.com/ekalinin/sitemap.js/blob/6bc3eb12c898c1037a35a11b2eb24ababdeb3580/README.md
(the URL from the commented-out "TOC for remote README.md" test).
Wiki pages, e.g. https://github.com/ekalinin/nodeenv/wiki/Who-Uses-Nodeenv, are not affected.

Linguagem predominante
Shell
Estrelas
3.3k
Forks
2.7k
Merge médio
20min
PRs com merge (30d)
7

Preparar o ambiente

  • Inclui um Dockerfile ou arquivo Docker Compose
  • Sem modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de ekalinin/github-markdown-toc

Todas as issues de ekalinin/github-markdown-toc

Issues semelhantes

Mais issues de Shell/Bash

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.