Skip to content

Section transclusion #13

@jmatsushita

Description

@jmatsushita

Using the basic section transclusion syntax :[](file.md#some-header), the content of the header in file.md will be transcluded.

Using sub section transclusion syntax :[](file.md##some-header) (note the ## instead of #) the content of the header until the header of the same header level will be transcluded (in other words, this will transclude sub header content).

#some-header will match the following (according to typical html anchor id generation):

  • # Some Header
  • # some_header
  • # sOme-heAder
  • ###### some&header

Basic Example

index.md

:[](section.md#header)

section.md

# Header

Content

## SubHeader

More Content

Will yield:

# Header 1

Content

Sub Section Example

index.md

:[](section.md##header)

section.md

Some other content

# Header

Content

## SubHeader

More Content

Will yield:

# Header 1

Content

## SubHeader

More Content

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions