Discussion:
strings again
bobef
2007-04-25 16:22:54 UTC
Permalink
In 0.08 beta the " in strings are prefixed with backslash but if the string contains backslash it left as is. In other words there is no telling if the backslash is for " or it is real backslash. I also think it will be a good idea to replace the \n and \r characters too, i.e. multiline strings to be displayed on single line.
Jascha Wetzel
2007-04-25 18:25:26 UTC
Permalink
i kept the replacing minimal. you can parse the string by searching for
the first quote that isn't escaped and treating all other chars as WYSIWYG.
WYSIWYG strings might be more readable, therefore i will add the full
escaping as an optional configuration in one of the next releases.
Post by bobef
In 0.08 beta the " in strings are prefixed with backslash but if the string contains backslash it left as is. In other words there is no telling if the backslash is for " or it is real backslash. I also think it will be a good idea to replace the \n and \r characters too, i.e. multiline strings to be displayed on single line.
bobef
2007-04-25 18:49:08 UTC
Permalink
Yeah, you may be right about readability. Anyway the \ needs to be escaped for sure, and currently it isn't...
Post by Jascha Wetzel
i kept the replacing minimal. you can parse the string by searching for
the first quote that isn't escaped and treating all other chars as WYSIWYG.
WYSIWYG strings might be more readable, therefore i will add the full
escaping as an optional configuration in one of the next releases.
Post by bobef
In 0.08 beta the " in strings are prefixed with backslash but if the string contains backslash it left as is. In other words there is no telling if the backslash is for " or it is real backslash. I also think it will be a good idea to replace the \n and \r characters too, i.e. multiline strings to be displayed on single line.
Loading...