Transclusion or including sub-documents for reuse

FYI: I released includes functionality that is quite powerful syntax and could be ported to CommonMark IMO.

{{ path }}
{{ path #section }}
{{ path @key:value }}
{{ path #section @key:value }}
{{ path @shift:N }}

Especially @shift:auto is useful to shift the headers down to the next level automatically on include.

It is online with demo apps (e.g. this) to check out and a nice side-effect: You can also in websites include (DB driven) snippets inside documents, so it is like mini-templating the safe way (including the same markup only). I didn’t find any measurable issue here.
Do you see any concerns? Or could this be ported in some capacity?

For MD specifically once has to disable HTML probably when using it in online context - or sanitize extra, since user input should not be trusted.
Locally, it should be fine to allow any and all syntax.