I noticed a weird behavior of Editor in a Playground.
This is an OSX playground.
XCode 10.1ß3
OSX 10.13.6
The playground is about 400 lines
When I type cmd-/ to comment or uncomment a line, everything works OK til a certain line in code
After this line, cmd- does not work, but instead copies the line above and comment it, replacing the original line.
After some test, I found that this exact line is causing the problem
aTri[i][k] = x // Use scaled a’s for transformation.
And in fact the last char: the dot and ansome invisible char after:
So, I copied the end of line ; as it inserted a return line in my string, I used multiline
var pbstr : String = """
.
"""
reading the unicode
for v in (pbstr.unicodeScalars) {
print(v.value)
}
yields
46
32
10
I thus copied and paste these 3 char a few lines above and the problem started to appear just there as well.
So, it appears that the LF char at the end is confusing the Editor. In fact, there should never be a LF there (it came from some text I copied and paste here)
Did anyone notice ? Have an explanation ?