Faulty padding with triple-quoted strings and empty lines · Issue #175 · satyr/coco (original) (raw)
There appears to be a problem with empty lines in triple-quoted strings:
(Note: 3 spaces in the empty line)
Produces the string "foo\n \n bar"
This is similar for when you put foo
on a seperate line. To fix this you'll have to either leave the empty line completely empty, or add an extra space to it. For some reason, less spaces in the empty line means more padding to the rest of the string - if this example had only one space in the empty line, it would produce 3 spaces in front of bar
instead of 1.
I should mention that CoffeeScript doesn't seem to have this issue.