schema-markdown 1.1.4 → 1.1.5
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/parser.js +22 -14
- package/package.json +1 -1
package/lib/parser.js
CHANGED
|
@@ -321,38 +321,46 @@ export class SchemaMarkdownParser {
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
// Match syntax
|
|
324
|
-
let
|
|
324
|
+
let matchName = 'comment';
|
|
325
|
+
let match = line.match(RE_COMMENT);
|
|
325
326
|
if (match === null) {
|
|
326
|
-
|
|
327
|
+
matchName = 'group';
|
|
328
|
+
match = line.match(RE_GROUP);
|
|
327
329
|
}
|
|
328
330
|
if (match === null) {
|
|
329
|
-
|
|
331
|
+
matchName = 'action';
|
|
332
|
+
match = line.match(RE_ACTION);
|
|
330
333
|
}
|
|
331
334
|
if (match === null) {
|
|
332
|
-
|
|
335
|
+
matchName = 'definition';
|
|
336
|
+
match = line.match(RE_DEFINITION);
|
|
333
337
|
}
|
|
334
338
|
if (match === null && action !== null) {
|
|
335
|
-
|
|
339
|
+
matchName = 'section';
|
|
340
|
+
match = line.match(RE_SECTION);
|
|
336
341
|
}
|
|
337
342
|
if (match === null && action !== null) {
|
|
338
|
-
|
|
343
|
+
matchName = 'section_plain';
|
|
344
|
+
match = line.match(RE_SECTION_PLAIN);
|
|
339
345
|
}
|
|
340
346
|
if (match === null && userType !== null && 'enum' in userType) {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
[matchName, match] = ['value', line.match(RE_VALUE_QUOTED)];
|
|
347
|
+
matchName = 'value';
|
|
348
|
+
match = line.match(RE_VALUE);
|
|
349
|
+
if (match === null) {
|
|
350
|
+
match = line.match(RE_VALUE_QUOTED);
|
|
346
351
|
}
|
|
347
352
|
}
|
|
348
353
|
if (match === null && userType !== null && 'struct' in userType) {
|
|
349
|
-
|
|
354
|
+
matchName = 'member';
|
|
355
|
+
match = line.match(RE_MEMBER);
|
|
350
356
|
}
|
|
351
357
|
if (match === null && urls !== null) {
|
|
352
|
-
|
|
358
|
+
matchName = 'urls';
|
|
359
|
+
match = line.match(RE_URL);
|
|
353
360
|
}
|
|
354
361
|
if (match === null) {
|
|
355
|
-
|
|
362
|
+
matchName = 'typedef';
|
|
363
|
+
match = line.match(RE_TYPEDEF);
|
|
356
364
|
}
|
|
357
365
|
if (match === null) {
|
|
358
366
|
matchName = null;
|