Skip to content

<!-- DOCTOC SKIP --> doesn't work #371

@DougLeonard

Description

@DougLeonard

Describe the bug

Files with <!-- DOCTOC SKIP --> at top are not skipped.

To Reproduce

  1. add a markdown file like Home.md with <!-- DOCTOC SKIP --> as the first line

  2. use following for .github/workflows/toc.yml:

on: push
name: TOC Generator
jobs:
  generateTOC:
    name: TOC Generator
    runs-on: ubuntu-latest
    steps:
      - uses: technote-space/toc-generator@v4
        with:
          TARGET_PATHS: "."
  1. push to github
  2. TOCs are added to all .md files, including Home.md

Expected behavior:

A TOC is not automatically added to Home.md

Additional context:

running

doctoc .

from the local clone produces the expected behavior, indicating that the comment tag is inserted correctly.
Maybe there is a difference is doctoc versions? Or I'm doing it wrong?

Edited toc.yml above, tested with both v3 and v4.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions