(context, args)
| 796 | numArgs: 1, |
| 797 | }, |
| 798 | handler(context, args) { |
| 799 | // Since no types are specified above, the two possibilities are |
| 800 | // - The argument is wrapped in {} or [], in which case Parser's |
| 801 | // parseGroup() returns an "ordgroup" wrapping some symbol node. |
| 802 | // - The argument is a bare symbol node. |
| 803 | const symNode = checkSymbolNodeType(args[0]); |
| 804 | const colalign: AnyParseNode[] = |
| 805 | symNode ? [args[0]] : assertNodeType(args[0], "ordgroup").body; |
| 806 | const cols: AlignSpec[] = colalign.map(function(nde) { |
| 807 | const node = assertSymbolNodeType(nde); |
| 808 | const ca = node.text; |
| 809 | if ("lcr".includes(ca)) { |
| 810 | return { |
| 811 | type: "align", |
| 812 | align: ca, |
| 813 | }; |
| 814 | } else if (ca === "|") { |
| 815 | return { |
| 816 | type: "separator", |
| 817 | separator: "|", |
| 818 | }; |
| 819 | } else if (ca === ":") { |
| 820 | return { |
| 821 | type: "separator", |
| 822 | separator: ":", |
| 823 | }; |
| 824 | } |
| 825 | throw new ParseError("Unknown column alignment: " + ca, nde); |
| 826 | }); |
| 827 | const res: Parameters<typeof parseArray>[1] = { |
| 828 | cols, |
| 829 | hskipBeforeAndAfter: true, // \@preamble in lttab.dtx |
| 830 | maxNumCols: cols.length, |
| 831 | }; |
| 832 | return parseArray(context.parser, res, dCellStyle(context.envName)); |
| 833 | }, |
| 834 | htmlBuilder, |
| 835 | mathmlBuilder, |
| 836 | }); |
nothing calls this directly
no test coverage detected
searching dependent graphs…