escape bars
This commit is contained in:
@ -37,20 +37,20 @@ export class TableOfContentsInstruction extends XmlComponent {
|
|||||||
this.root.push(new TextAttributes({ space: "preserve" }));
|
this.root.push(new TextAttributes({ space: "preserve" }));
|
||||||
let instruction = "TOC";
|
let instruction = "TOC";
|
||||||
if (this.properties.entriesFromSession) {
|
if (this.properties.entriesFromSession) {
|
||||||
instruction = `${instruction} \b "${this.properties.entriesFromSession}"`;
|
instruction = `${instruction} \\b "${this.properties.entriesFromSession}"`;
|
||||||
}
|
}
|
||||||
if (this.properties.hiperlink) {
|
if (this.properties.hiperlink) {
|
||||||
instruction = `${instruction} \h`;
|
instruction = `${instruction} \\h`;
|
||||||
}
|
}
|
||||||
if (this.properties.entryLevelsRange) {
|
if (this.properties.entryLevelsRange) {
|
||||||
instruction = `${instruction} \n "${this.properties.entryLevelsRange}"`;
|
instruction = `${instruction} \\n "${this.properties.entryLevelsRange}"`;
|
||||||
}
|
}
|
||||||
if (this.properties.headerRange) {
|
if (this.properties.headerRange) {
|
||||||
instruction = `${instruction} \o "${this.properties.headerRange}"`;
|
instruction = `${instruction} \\o "${this.properties.headerRange}"`;
|
||||||
}
|
}
|
||||||
if (this.properties.styles && this.properties.styles.length) {
|
if (this.properties.styles && this.properties.styles.length) {
|
||||||
const styles = this.properties.styles.map((sl) => `${sl.styleName}, ${sl.level}`).join(", ");
|
const styles = this.properties.styles.map((sl) => `${sl.styleName}, ${sl.level}`).join(", ");
|
||||||
instruction = `${instruction} \t "${styles}"`;
|
instruction = `${instruction} \\t "${styles}"`;
|
||||||
}
|
}
|
||||||
this.root.push(instruction);
|
this.root.push(instruction);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ const DEFAULT_TOC = {
|
|||||||
"xml:space": "preserve",
|
"xml:space": "preserve",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'TOC \n "1-6"',
|
'TOC \\n "1-6"',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user