← Back to team overview

kicad-developers team mailing list archive

Escapes in the s-expr format documentation

 

In the file format specification at [1] via [2], we specify the
following for string escapes:

> Here is a legal string with an embedded quote: leg"23
> Here is the same string quoted, and because it is quoted the internal
> quote must be duplicated: "leg""23"

This is NOT how we are actually quoting strings: we are using \".

I suggest updating the format document rather than the code, because:

1) This avoids changing any actual files we write
2) Escaping quotes with "" is weird, especially considering we use
   backslash escapes in other places - be consistent

But no matter how we fix it, this should be fixed; people are using
these format documents to implement parsers (I just spoke to one).

[1] http://bazaar.launchpad.net/~stambaughw/kicad/doc-read-only/download/head:/1115%4016bec504-3128-0410-b3e8-8e38c2123bca:trunk%252Fkicad-doc%252Fdoc%252Fhelp%252Ffile_formats%252Ffile_formats.pdf/file_formats.pdf
[2] http://kicad-pcb.org/help/file-formats/

-- 
Chris


Follow ups