mustache / spec

The Mustache spec.
MIT License
361 stars 71 forks source link

Add test case for dotted names #180

Open simon-ess opened 8 months ago

simon-ess commented 8 months ago

Closes #179

jobol commented 8 months ago

I just added a related not in discussion 174: https://github.com/mustache/spec/discussions/174

It does not solves that issue but introduces a valid idea:

This current discussion might join it and many other about quoting keys or escaping characters.

I can see it is a solution: tell there is a standard escape character, say \ because it is common. So a.b is hierarchical for 2 keys when a\.b is one key.

jgonggrijp commented 8 months ago

@jobol Could you use backticks (`) to surround code, so that the backslash does not disappear from your posts? I currently cannot tell where you wrote a.b and where a\.b, because both appear as a.b.

Your suggestion to start an overarching discussion about escaping makes sense. Please feel free to file a new ticket for it in Discussions.