crossnote icon indicating copy to clipboard operation
crossnote copied to clipboard

increase headings level for imported md documents

Open vppuzakov opened this issue 6 years ago • 1 comments

Hi,

I have a problem with the headings of imported markdown documents. For example:

main.md:

# Main document

@import "child.md"

child.md:

# Child document

## Inner child header

This produces result.md:

# Main document

# Child document

## Inner child header

Expected result:

# Main document

## Child document

### Inner child header

vppuzakov avatar Nov 25 '19 17:11 vppuzakov

I sometimes use @import directive to separate large documents into sections.

main.md

# document title {ignore=true}

# Overview {ignore=true}

[TOC]

@import "./section_1.md"
@import "./section_2.md"
@import "./section_3.md"

section_1.md

# Section  1

## Section  1.1

some contents here...

This PR does not fit into existing use cases and I cannot accept it as a user of MPE.

You can solve this problem by adding additional attributes to @import directive. Of course, this feature is disabled by default.

It is recommended that you create an issue to discuss what options should be added.

tmori3y2 avatar Nov 27 '19 13:11 tmori3y2