markdown-include icon indicating copy to clipboard operation
markdown-include copied to clipboard

inheritHeadingDepth should refer to the original including file's depth

Open sepulzera opened this issue 4 years ago • 0 comments

With inheritHeadingDepth being true.

Let a top-level file be:

# Some first level heading

{!sub/Subsection_1.md!}

{!task/Subsection_2.md!}

{!task/Subsection_3.md!}

And let each task/Subection_X.md be:

# Some heading <X>

Some text.

Then, I would expect the result to be:

# Some first level heading

## Some heading 1

Some text.

## Some heading 2

Some text.

## Some heading 3

Some text.

But, the actual result is:

# Some first level heading

## Some heading 1

Some text.

### Some heading 2

Some text.

#### Some heading 3

Some text.

With the current implementation of inheritHeadingDepth, it is impossible to include several sections on the same level.

Current workaround probably is to move the heading from the sections into the parent file.

sepulzera avatar Feb 12 '21 14:02 sepulzera