From c429ae9920837516cac9d81cf8eefa3051e7f281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mendon=C3=A7a?= Date: Sun, 21 Oct 2018 19:37:37 -0200 Subject: [PATCH 1/2] changed comma by semicolon to work in Word 2016. --- src/file/table-of-contents/field-instruction.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file/table-of-contents/field-instruction.ts b/src/file/table-of-contents/field-instruction.ts index 7194cf3f16..09f5129613 100644 --- a/src/file/table-of-contents/field-instruction.ts +++ b/src/file/table-of-contents/field-instruction.ts @@ -56,7 +56,7 @@ export class FieldInstruction extends XmlComponent { instruction = `${instruction} \\s "${this.properties.seqFieldIdentifierForPrefix}"`; } if (this.properties.stylesWithLevels && this.properties.stylesWithLevels.length) { - const styles = this.properties.stylesWithLevels.map((sl) => `${sl.styleName},${sl.level}`).join(","); + const styles = this.properties.stylesWithLevels.map((sl) => `${sl.styleName};${sl.level}`).join(";"); instruction = `${instruction} \\t "${styles}"`; } if (this.properties.useAppliedParagraphOutlineLevel) { From 96d81873d819f3f211a2758b0b9d54d9fa4c5bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mendon=C3=A7a?= Date: Sun, 21 Oct 2018 19:56:31 -0200 Subject: [PATCH 2/2] forgot to fix the test --- src/file/table-of-contents/table-of-contents.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file/table-of-contents/table-of-contents.spec.ts b/src/file/table-of-contents/table-of-contents.spec.ts index 6729f004ba..a2e25dd68a 100644 --- a/src/file/table-of-contents/table-of-contents.spec.ts +++ b/src/file/table-of-contents/table-of-contents.spec.ts @@ -174,7 +174,7 @@ const COMPLETE_TOC = { "xml:space": "preserve", }, }, - 'TOC \\a "A" \\b "B" \\c "C" \\d "D" \\f "F" \\h \\l "L" \\n "N" \\o "O" \\p "P" \\s "S" \\t "SL,1,SL,2" \\u \\w \\x \\z', + 'TOC \\a "A" \\b "B" \\c "C" \\d "D" \\f "F" \\h \\l "L" \\n "N" \\o "O" \\p "P" \\s "S" \\t "SL;1;SL;2" \\u \\w \\x \\z', ], }, {