[CLJS-668] read-string doesn't correctly handle comments Created: 07/Nov/13 Updated: 09/Nov/13 Resolved: 09/Nov/13
|Patch:||Code and Test|
If you try to read a string that has a comment, extra lines are skipped seemingly due to some aspect of equality that I don't understand. The code in master checks for (identical? ch \n), which doesn't appear to be true. Switching this to (identical? ch "\n") fixes this, but is JS specific. I've included tests that fail in master but pass with this change.
|Comment by Eric Normand [ 07/Nov/13 9:06 PM ]|
\n is the character 'n', \r is the character 'r'.
\newline and \return are what you want.
|Comment by Chris Granger [ 07/Nov/13 10:21 PM ]|
hah - duh. Added a new version of the patch that uses \newline and \return
|Comment by David Nolen [ 09/Nov/13 3:38 PM ]|