mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Normalize \r\n to \n
This commit is contained in:
parent
714bbe7c1b
commit
fbc55eff00
@ -37,6 +37,11 @@ function TextNode(text, escapeXml) {
|
||||
if (text != null && typeof text !== 'string') {
|
||||
throw createError('Invalid text: ' + text);
|
||||
}
|
||||
|
||||
if (text) {
|
||||
text = text.replace(/\r\n/g, '\n');
|
||||
}
|
||||
|
||||
this.text = text;
|
||||
this.escapeXml = escapeXml !== false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user