fix(styles): Escape \r characters in compiled text

Closes #5772

Closes #5835
This commit is contained in:
Tim Blasi
2015-12-11 09:56:50 -08:00
committed by Timothy Blasi
parent 0cb32c2fef
commit 92ddc62bed
2 changed files with 10 additions and 2 deletions
@@ -27,6 +27,9 @@ export function main() {
it('should escape newlines',
() => { expect(escapeSingleQuoteString('\n')).toEqual(`'\\n'`); });
it('should escape carriage returns',
() => { expect(escapeSingleQuoteString('\r')).toEqual(`'\\r'`); });
if (IS_DART) {
it('should escape $', () => { expect(escapeSingleQuoteString('$')).toEqual(`'\\$'`); });
} else {
@@ -44,6 +47,9 @@ export function main() {
it('should escape newlines',
() => { expect(escapeDoubleQuoteString('\n')).toEqual(`"\\n"`); });
it('should escape carriage returns',
() => { expect(escapeDoubleQuoteString('\r')).toEqual(`"\\r"`); });
if (IS_DART) {
it('should escape $', () => { expect(escapeDoubleQuoteString('$')).toEqual(`"\\$"`); });
} else {