foliant-docs / foliant

Comprehensive markdown-based documentation toolkit
https://foliant-docs.github.io/docs/
MIT License
158 stars 9 forks source link

Double curly braces inside the code blocks #28

Closed artlomov closed 6 years ago

artlomov commented 6 years ago

Foliant uses the following syntax for including the content of external Markdown files:

{{ ./path/to/some_file.md }}

However, sometimes it may be necessary to use double curly braces inside the text of documents, right as in the example above.

To prevent attempts to resolve includes by Foliant in this case, we can escape curly braces with backslashes or we can use HTML entities instead of curly braces. But these methods are not applicable inside the text that is marked as code. We get one of two results:

It seems to me that Foliant should not to interpret any sequences of characters as syntax constructions if they are located inside the blocks of code. Or, at least, Foliant should leave the source character sequence unchanged if its processing has been failed: {{.Mrf}}{{.Mrf}}.