archieml.org icon indicating copy to clipboard operation
archieml.org copied to clipboard

Spec may incorrectly limit multiline escaping

Open partlyhuman opened this issue 8 years ago • 1 comments

Hi there, I'm in the middle of implementing an ArchieML parser for C# from the ground up, using your tests and spec as my guide. I may have run into a contradiction regarding escaping of backslashes in multiline values. On one hand, the spec states:

To avoid as much processing as possible, leading backslashes should be removed only when the backslash is the first character of a line (but not a value's first line), and when the second character is any of the following: {, [, *, : or .

On the other hand, test multi_line.17.aml would fail if this were done. It asserts that a key-value line like \key:value should have its leading backslash stripped, but the spec wouldn't strip this since the second character is 'k'.

I'm going by the tests for now over the spec, and stripping initial backslashes from all internal multiline lines when it is at column 0 regardless of what follows it. Feedback appreciated. I may be wrong about something.

partlyhuman avatar Oct 07 '15 22:10 partlyhuman