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.
Files changed (2) hide show
  1. package/lib/parser.js +22 -14
  2. 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 [matchName, match] = ['comment', line.match(RE_COMMENT)];
324
+ let matchName = 'comment';
325
+ let match = line.match(RE_COMMENT);
325
326
  if (match === null) {
326
- [matchName, match] = ['group', line.match(RE_GROUP)];
327
+ matchName = 'group';
328
+ match = line.match(RE_GROUP);
327
329
  }
328
330
  if (match === null) {
329
- [matchName, match] = ['action', line.match(RE_ACTION)];
331
+ matchName = 'action';
332
+ match = line.match(RE_ACTION);
330
333
  }
331
334
  if (match === null) {
332
- [matchName, match] = ['definition', line.match(RE_DEFINITION)];
335
+ matchName = 'definition';
336
+ match = line.match(RE_DEFINITION);
333
337
  }
334
338
  if (match === null && action !== null) {
335
- [matchName, match] = ['section', line.match(RE_SECTION)];
339
+ matchName = 'section';
340
+ match = line.match(RE_SECTION);
336
341
  }
337
342
  if (match === null && action !== null) {
338
- [matchName, match] = ['section_plain', line.match(RE_SECTION_PLAIN)];
343
+ matchName = 'section_plain';
344
+ match = line.match(RE_SECTION_PLAIN);
339
345
  }
340
346
  if (match === null && userType !== null && 'enum' in userType) {
341
- const matchValue = line.match(RE_VALUE);
342
- if (matchValue !== null) {
343
- [matchName, match] = ['value', matchValue];
344
- } else {
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
- [matchName, match] = ['member', line.match(RE_MEMBER)];
354
+ matchName = 'member';
355
+ match = line.match(RE_MEMBER);
350
356
  }
351
357
  if (match === null && urls !== null) {
352
- [matchName, match] = ['urls', line.match(RE_URL)];
358
+ matchName = 'urls';
359
+ match = line.match(RE_URL);
353
360
  }
354
361
  if (match === null) {
355
- [matchName, match] = ['typedef', line.match(RE_TYPEDEF)];
362
+ matchName = 'typedef';
363
+ match = line.match(RE_TYPEDEF);
356
364
  }
357
365
  if (match === null) {
358
366
  matchName = null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "schema-markdown",
4
- "version": "1.1.4",
4
+ "version": "1.1.5",
5
5
  "description": "Human-friendly schema definition language and schema validator",
6
6
  "keywords": [
7
7
  "schema",