fix line ending split regexp to avoid the brain dead $ meta character (which considers \r\n to be TWO line endings.)
This commit is contained in:
rginda%netscape.com 2001-09-06 22:29:14 +00:00
Родитель 4897ca96e2
Коммит 0694bfa5b1
2 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -433,14 +433,13 @@ function sr_loadsrc (cb)
}
sourceRec.isLoaded = true;
var ary = data.split(/$/m);
var ary = data.split(/\r\n|\n|\r/m);
for (var i = 0; i < ary.length; ++i)
{
/* We use "new String" here so we can decorate the source line
* with attributes used while displaying the source, like
* "breakpoint", "breakable", and "warning".
* The replace() strips control characters, including whatever
* line endings we just split() on. we leave the tabs in
* The replace() strips control characters, we leave the tabs in
* so we can expand them to a per-file width before actually
* displaying them.
*/

Просмотреть файл

@ -433,14 +433,13 @@ function sr_loadsrc (cb)
}
sourceRec.isLoaded = true;
var ary = data.split(/$/m);
var ary = data.split(/\r\n|\n|\r/m);
for (var i = 0; i < ary.length; ++i)
{
/* We use "new String" here so we can decorate the source line
* with attributes used while displaying the source, like
* "breakpoint", "breakable", and "warning".
* The replace() strips control characters, including whatever
* line endings we just split() on. we leave the tabs in
* The replace() strips control characters, we leave the tabs in
* so we can expand them to a per-file width before actually
* displaying them.
*/