Merge pull request #176 from dolanmiu/bugfix/correct-toc-instruction

fixed TOC instruction that was missing quotes for some switches
This commit is contained in:
Dolan
2018-10-20 17:36:44 +01:00
committed by GitHub
2 changed files with 6 additions and 6 deletions

View File

@ -41,19 +41,19 @@ export class FieldInstruction extends XmlComponent {
instruction = `${instruction} \\h`;
}
if (this.properties.tcFieldLevelRange) {
instruction = `${instruction} \\l "${this.properties.tcFieldLevelRange}`;
instruction = `${instruction} \\l "${this.properties.tcFieldLevelRange}"`;
}
if (this.properties.pageNumbersEntryLevelsRange) {
instruction = `${instruction} \\n "${this.properties.pageNumbersEntryLevelsRange}`;
instruction = `${instruction} \\n "${this.properties.pageNumbersEntryLevelsRange}"`;
}
if (this.properties.headingStyleRange) {
instruction = `${instruction} \\o "${this.properties.headingStyleRange}`;
instruction = `${instruction} \\o "${this.properties.headingStyleRange}"`;
}
if (this.properties.entryAndPageNumberSeparator) {
instruction = `${instruction} \\p "${this.properties.entryAndPageNumberSeparator}`;
instruction = `${instruction} \\p "${this.properties.entryAndPageNumberSeparator}"`;
}
if (this.properties.seqFieldIdentifierForPrefix) {
instruction = `${instruction} \\s "${this.properties.seqFieldIdentifierForPrefix}`;
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(",");

View File

@ -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',
],
},
{