markdown-it-adv-table 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/table.js +4 -7
- package/package.json +1 -1
package/lib/table.js
CHANGED
|
@@ -64,26 +64,23 @@ export class TableSpec {
|
|
|
64
64
|
static parseInfoString(info) {
|
|
65
65
|
const lexer = new Lexer(info);
|
|
66
66
|
const tokens = [];
|
|
67
|
-
const
|
|
67
|
+
const anyRe = /^[^\"=\s]*/;
|
|
68
68
|
const result = {};
|
|
69
69
|
let cp = 0;
|
|
70
70
|
while (cp != Lexer.EOF) {
|
|
71
71
|
lexer.skipWhitespace();
|
|
72
72
|
cp = lexer.peek();
|
|
73
|
-
if (Lexer.
|
|
74
|
-
tokens.push(lexer.
|
|
73
|
+
if (Lexer.cmp(cp, "=")) {
|
|
74
|
+
tokens.push(lexer.consume());
|
|
75
75
|
}
|
|
76
76
|
else if (Lexer.cmp(cp, "\"")) {
|
|
77
77
|
tokens.push(lexer.consumeLiteral("\""));
|
|
78
78
|
}
|
|
79
|
-
else if (Lexer.cmp(cp, "=")) {
|
|
80
|
-
tokens.push(lexer.consume());
|
|
81
|
-
}
|
|
82
79
|
else if (Lexer.isEOF(cp)) {
|
|
83
80
|
break;
|
|
84
81
|
}
|
|
85
82
|
else {
|
|
86
|
-
tokens.push(lexer.
|
|
83
|
+
tokens.push(lexer.consumeRe(anyRe));
|
|
87
84
|
}
|
|
88
85
|
}
|
|
89
86
|
;
|