mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-21 23:58:07 +02:00
Replace \n and \r by \n and \r when saving a string
This commit is contained in:
parent
741ce4f7fc
commit
0c8de5aaf9
2 changed files with 13 additions and 5 deletions
|
@ -319,9 +319,9 @@ describe("util", function () {
|
|||
});
|
||||
|
||||
describe("escapeString", function () {
|
||||
it("should escape (, ) and \\", function () {
|
||||
expect(escapeString("((a\\a))(b(b\\b)b)")).toEqual(
|
||||
"\\(\\(a\\\\a\\)\\)\\(b\\(b\\\\b\\)b\\)"
|
||||
it("should escape (, ), \n, \r and \\", function () {
|
||||
expect(escapeString("((a\\a))\n(b(b\\b)\rb)")).toEqual(
|
||||
"\\(\\(a\\\\a\\)\\)\\n\\(b\\(b\\\\b\\)\\rb\\)"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue