Hacker News new | ask | show | jobs
by matzf 1683 days ago
This made my curious to find out. The "Language introduction" docs [1] answers these points;

* keys containing leading spaces, newlines or colons can be represented with the multiline key form, where each line of the key starts with `: `.

* leading or trailing space is not complicated; the string values are just the rest of the line after the separator from the key, `: `. The values are not trimmed.

* a string value beginning with `[` just works in most places. This would not be confused with list values, as these would only start after a new line. Only in the compact inline list and inline dict form there are restricted characters for syntax.

It seems that their claim, no escaping required, holds. The slightly more verbose form of the language constructs may be required to represent special values though.

[1]: https://nestedtext.org/en/stable/basic_syntax.html