* Converts the textual input of an unsupported command into a text node * contained within a color node whose color is determined by errorColor
(text: string)
| 311 | * contained within a color node whose color is determined by errorColor |
| 312 | */ |
| 313 | formatUnsupportedCmd(text: string): UnsupportedCmdParseNode { |
| 314 | const textordArray: ParseNode<"textord">[] = []; |
| 315 | |
| 316 | for (let i = 0; i < text.length; i++) { |
| 317 | textordArray.push({type: "textord", mode: "text", text: text[i]}); |
| 318 | } |
| 319 | |
| 320 | const textNode: ParseNode<"text"> = { |
| 321 | type: "text", |
| 322 | mode: this.mode, |
| 323 | body: textordArray, |
| 324 | }; |
| 325 | const colorNode: ParseNode<"color"> = { |
| 326 | type: "color", |
| 327 | mode: this.mode, |
| 328 | color: this.settings.errorColor, |
| 329 | body: [textNode], |
| 330 | }; |
| 331 | |
| 332 | return colorNode; |
| 333 | } |
| 334 | |
| 335 | /** |
| 336 | * Parses a group with optional super/subscripts. |
no outgoing calls
no test coverage detected