Open lucaswerkmeister opened 10 years ago
LiteralVisitor.stripIndent
only gets the text
of the string literal, but it could still check that the WS of the last line has the right length.
I’ll try fixing this.
Ah, it’s not just the last line. The current stripIndent
also allows blank lines to have any WS.
Whoa, lots of errors in ceylon.language
with the fix…
Lots of documentation with wrong WS in ceylon.language
. Most of it seems to be verbatim strings where a few blank lines have still only one space instead of three – they probably used to be regular strings, and the conversion didn’t catch the blank lines.
Oh, there’s also this:
"""Doc
doc
more doc
"""
Do we want to allow that?
Well I think that's desirable. Some tools strip of trailing white space. We would not want that to break the code.
Hm, good point. Does the spec need updating then?
(Also, I’m still going to fix the doc whitespace in ceylon.language
. You can then decide if you want to merge it or not.)
I’ve pushed my changes to my branches ceylon-spec:fix_999
(lucaswerkmeister@cac76ec32cb8ceaffa01b277ba6dd270ac940ea8) and ceylon.language:ceylonSpec999
(lucaswerkmeister/ceylon.language@eb7de62f4495da34add6148f67d75edb51cfcf74).
The following code is accepted:
Relevant part of the spec:
I think that means that the closing double quotes should have to be aligned as well.