Toml: Proposal: dynamic number of ' in multi-line literal strings

Created on 5 Feb 2018  路  2Comments  路  Source: toml-lang/toml

Proposal:
Add support for any number of ' to be present in multi-line literal strings.
This can be done by enabling the starting number of ' be variable, and one more than present in the string itself (minimum 3).

Example:
[object]
text = ''''' It''''s '''''

I have implemented support for this in my extended version parser:
https://github.com/DraagrenKirneh/TOML

Most helpful comment

Hi!

What we have currently is flexible enough and if it's not, it is easy enough to switch to the basic string format. Plus, I don't expect anyone doing something requiring triple quotes inside a literal string.

Could you provide a concrete example where this would be a useful extension?

All 2 comments

Hi!

What we have currently is flexible enough and if it's not, it is easy enough to switch to the basic string format. Plus, I don't expect anyone doing something requiring triple quotes inside a literal string.

Could you provide a concrete example where this would be a useful extension?

I'll go ahead and close this due to a lack of a response from OP on this.

The only use case that @mojombo and I could come up with for this was actually embedding another file within the multi-line literal string at which point switching to a basic string and escaping or just actually having another file for it just works better.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

keiichiiownsu12 picture keiichiiownsu12  路  4Comments

tamasfe picture tamasfe  路  3Comments

genericptr picture genericptr  路  4Comments

mqudsi picture mqudsi  路  3Comments

clarfonthey picture clarfonthey  路  4Comments