Talk:S-expressions: Difference between revisions

(JavaScript, bugfix for \" and \n in strings)
 
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")
 
ForSee below for my "hack" infor the procedural version. see below, theThe 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
String.prototype.parseSexpr = function () {
//schweick: modified first option in regexp to catch string containing \"
3

edits