Talk:S-expressions: Difference between revisions
→JavaScript version bugfix for \" and \n in strings: added example
(JavaScript, bugfix for \" and \n in strings) |
(→JavaScript version bugfix for \" and \n in strings: added example) |
||
Line 254:
== JavaScript version bugfix for \" and \n in strings ==
I found that the present solution doesn't treat escaped double quotes and newlines in strings right (used in KiCad)
For my "hack" in the procedural version see below, the functional version is too difficult to read for me - in any case, I hope that the original author comes back to fix it correctly, right now it just works for my purpose▼
(property "ki_description" "Power symbol creates a global label with name \"GND\" ,\nexample new line")
▲
String.prototype.parseSexpr = function () {
//schweick: modified first option in regexp to catch string containing \"
|