We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 845959a commit d3f00ddCopy full SHA for d3f00dd
ts/input/tex/TexParser.ts
@@ -623,6 +623,12 @@ export default class TexParser {
623
return node;
624
}
625
626
+ /**
627
+ * Trim spaces from the ends of a TeX string, leave a space when the last item is "\ "
628
+ *
629
+ * @param {string} tex The TeX string to trim
630
+ * @returns {string} The trimmed string
631
+ */
632
protected trimTex(tex: string): string {
633
return tex.trim() + (tex.match(/(?:^|[^\\])(?:\\\\)*\\\s+$/) ? ' ' : '');
634
0 commit comments