Skip to content

Duplicate TOC entries when compiling MD files from several JSONs in single JS #27

Description

@pharaoh1st
fs.readdirSync("./").filter(f => f.toLowerCase().endsWith(".json")).forEach(function(markdownJson) {
  markdownInclude.compileFiles(markdownJson).then(function () {
    console.info(markdownJson + ' have been built successfully');
  })
});

Example:
There are 3 JSON files in the directory with different files for compilation. But some of the MD files are reused in different compiled MD files.

1st.md content

#include my.md

2nd.md content

#include my.md
#include my2.md

3rd.md content

#include my.md
#include my3.md

my2.md content

some content about my2.
#include my3.md

every MD file has it's own unique Heading with !heading tag for inclusion into TOC.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions