Skip to content

Commit d3f00dd

Browse files
committed
Add missing JSDoc, as per review
1 parent 845959a commit d3f00dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ts/input/tex/TexParser.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,12 @@ export default class TexParser {
623623
return node;
624624
}
625625

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+
*/
626632
protected trimTex(tex: string): string {
627633
return tex.trim() + (tex.match(/(?:^|[^\\])(?:\\\\)*\\\s+$/) ? ' ' : '');
628634
}

0 commit comments

Comments
 (0)