зеркало из https://github.com/mozilla/pjs.git
Bug #39034. Fixed stupid logic that broke \n, sorry.
This commit is contained in:
Родитель
cdc7440df6
Коммит
345804582d
|
@ -87,20 +87,19 @@ final class LineBuffer {
|
|||
lastWasCR = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((buffer[offset] == '\n')
|
||||
|| (buffer[offset] == Character.LINE_SEPARATOR) // 2028
|
||||
|| (buffer[offset] == Character.PARAGRAPH_SEPARATOR)) // 2029
|
||||
else
|
||||
if ((buffer[offset] != '\n')
|
||||
&& (buffer[offset] != '\u2028')
|
||||
&& (buffer[offset] != '\u2029'))
|
||||
{
|
||||
return (int) buffer[offset++];
|
||||
}
|
||||
offset++;
|
||||
prevStart = lineStart;
|
||||
lineStart = offset;
|
||||
lineno++;
|
||||
return '\n';
|
||||
}
|
||||
return (int) buffer[offset++];
|
||||
}
|
||||
}
|
||||
if ((buffer[offset] >= 128)
|
||||
&& Character.getType(buffer[offset]) == Character.FORMAT) {
|
||||
hadCFSinceStringStart = true;
|
||||
|
|
|
@ -87,20 +87,19 @@ final class LineBuffer {
|
|||
lastWasCR = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((buffer[offset] == '\n')
|
||||
|| (buffer[offset] == Character.LINE_SEPARATOR) // 2028
|
||||
|| (buffer[offset] == Character.PARAGRAPH_SEPARATOR)) // 2029
|
||||
else
|
||||
if ((buffer[offset] != '\n')
|
||||
&& (buffer[offset] != '\u2028')
|
||||
&& (buffer[offset] != '\u2029'))
|
||||
{
|
||||
return (int) buffer[offset++];
|
||||
}
|
||||
offset++;
|
||||
prevStart = lineStart;
|
||||
lineStart = offset;
|
||||
lineno++;
|
||||
return '\n';
|
||||
}
|
||||
return (int) buffer[offset++];
|
||||
}
|
||||
}
|
||||
if ((buffer[offset] >= 128)
|
||||
&& Character.getType(buffer[offset]) == Character.FORMAT) {
|
||||
hadCFSinceStringStart = true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче