Adding test for Utils
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adsooi 2024-10-12 03:22:49 +02:00
parent 0abb22130f
commit 885d1f5dc3
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
4 changed files with 404 additions and 202 deletions

View file

@ -137,9 +137,9 @@ class LatexAPI extends Module {
*/
parif(elem, contents) {
elem = elem.toString()
if(elem[0] !== "(" && elem[elem.length - 1] !== ")" && contents.some(x => elem.indexOf(x) > 0))
if(elem[0] !== "(" && elem.at(-1) !== ")" && contents.some(x => elem.indexOf(x) > 0))
return this.par(elem)
if(elem[0] === "(" && elem[elem.length - 1] === ")")
if(elem[0] === "(" && elem.at(-1) === ")")
return elem.removeEnclosure()
return elem
}