podlite 0.0.67 → 0.0.69

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.
@@ -0,0 +1,3 @@
1
+ import type { Rule } from '../types';
2
+ export declare const ATTR_VALUE_DROPPED_RULE_ID = "attr-value-dropped";
3
+ export declare const attrValueDroppedRule: Rule;
@@ -0,0 +1,15 @@
1
+ export const ATTR_VALUE_DROPPED_RULE_ID = 'attr-value-dropped';
2
+ export const attrValueDroppedRule = {
3
+ id: ATTR_VALUE_DROPPED_RULE_ID,
4
+ severity: 'warning',
5
+ // a directive the parser could not read is the business of syntax-valid
6
+ check: (ast, _ctx) => (ast.diagnostics || [])
7
+ .filter(d => d.code !== 'directive-unreadable')
8
+ .map(d => ({
9
+ rule: ATTR_VALUE_DROPPED_RULE_ID,
10
+ severity: d.severity,
11
+ message: d.message,
12
+ location: d.location,
13
+ })),
14
+ };
15
+ //# sourceMappingURL=attr-value-dropped.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attr-value-dropped.js","sourceRoot":"","sources":["../../../src/lint/rules/attr-value-dropped.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,0BAA0B,GAAG,oBAAoB,CAAA;AAE9D,MAAM,CAAC,MAAM,oBAAoB,GAAS;IACxC,EAAE,EAAE,0BAA0B;IAC9B,QAAQ,EAAE,SAAS;IACnB,wEAAwE;IACxE,KAAK,EAAE,CAAC,GAAoB,EAAE,IAAiB,EAAe,EAAE,CAC9D,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,sBAAsB,CAAC;SAC9C,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACT,IAAI,EAAE,0BAA0B;QAChC,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,QAAQ,EAAE,CAAC,CAAC,QAAQ;KACrB,CAAC,CAAC;CACR,CAAA"}
@@ -2,5 +2,14 @@ import { syntaxValidRule } from './syntax-valid';
2
2
  import { headingHierarchyRule } from './heading-hierarchy';
3
3
  import { idUniqueRule } from './id-unique';
4
4
  import { mediaAbsoluteFileRule } from './media-absolute-file';
5
- export const DEFAULT_RULES = [syntaxValidRule, headingHierarchyRule, idUniqueRule, mediaAbsoluteFileRule];
5
+ import { linkTargetResolvesRule } from './link-target-resolves';
6
+ import { attrValueDroppedRule } from './attr-value-dropped';
7
+ export const DEFAULT_RULES = [
8
+ syntaxValidRule,
9
+ headingHierarchyRule,
10
+ idUniqueRule,
11
+ mediaAbsoluteFileRule,
12
+ linkTargetResolvesRule,
13
+ attrValueDroppedRule,
14
+ ];
6
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lint/rules/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,MAAM,CAAC,MAAM,aAAa,GAAW,CAAC,eAAe,EAAE,oBAAoB,EAAE,YAAY,EAAE,qBAAqB,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lint/rules/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,CAAC,MAAM,aAAa,GAAW;IACnC,eAAe;IACf,oBAAoB;IACpB,YAAY;IACZ,qBAAqB;IACrB,sBAAsB;IACtB,oBAAoB;CACrB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { Rule } from '../types';
2
+ export declare const LINK_TARGET_RESOLVES_RULE_ID = "link-target-resolves";
3
+ export declare const linkTargetResolvesRule: Rule;
@@ -0,0 +1,40 @@
1
+ import { collectExplicitIds } from './id-unique';
2
+ export const LINK_TARGET_RESOLVES_RULE_ID = 'link-target-resolves';
3
+ // A link without display text carries the target in its content instead of meta.
4
+ const linkTarget = (node) => {
5
+ if (typeof node.meta === 'string')
6
+ return node.meta.trim();
7
+ const content = Array.isArray(node.content) ? node.content : [];
8
+ const first = content[0];
9
+ return typeof first === 'string' ? first.trim() : '';
10
+ };
11
+ // Inline nodes carry no location, so the nearest enclosing block supplies one.
12
+ const collectAnchors = (node, at) => {
13
+ if (Array.isArray(node))
14
+ return node.flatMap(child => collectAnchors(child, at));
15
+ if (!node || typeof node !== 'object')
16
+ return [];
17
+ const n = node;
18
+ const here = n.location || at;
19
+ const found = n.type === 'fcode' && (n.name === 'L' || n.name === 'W') ? [{ target: linkTarget(n), at: here }] : [];
20
+ return [...found, ...collectAnchors(n.content, here)];
21
+ };
22
+ export const linkTargetResolvesRule = {
23
+ id: LINK_TARGET_RESOLVES_RULE_ID,
24
+ severity: 'error',
25
+ check: (ast, _ctx) => {
26
+ const anchors = collectAnchors(ast).filter(({ target }) => target.startsWith('#'));
27
+ if (anchors.length === 0)
28
+ return [];
29
+ const known = new Set(collectExplicitIds(ast).map(entry => entry.value));
30
+ return anchors
31
+ .filter(({ target }) => !known.has(target.slice(1)))
32
+ .map(({ target, at }) => ({
33
+ rule: LINK_TARGET_RESOLVES_RULE_ID,
34
+ severity: 'error',
35
+ message: `Link target ${target} has no matching :id<${target.slice(1)}>`,
36
+ location: at,
37
+ }));
38
+ },
39
+ };
40
+ //# sourceMappingURL=link-target-resolves.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-target-resolves.js","sourceRoot":"","sources":["../../../src/lint/rules/link-target-resolves.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,CAAC,MAAM,4BAA4B,GAAG,sBAAsB,CAAA;AASlE,iFAAiF;AACjF,MAAM,UAAU,GAAG,CAAC,IAAc,EAAU,EAAE;IAC5C,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAA;IAC1D,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;IAC/D,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IACxB,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;AACtD,CAAC,CAAA;AAED,+EAA+E;AAC/E,MAAM,cAAc,GAAG,CACrB,IAAa,EACb,EAA0B,EAC6B,EAAE;IACzD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAA;IAChF,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAA;IAChD,MAAM,CAAC,GAAG,IAAsE,CAAA;IAChF,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAA;IAC7B,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACnH,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;AACvD,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAS;IAC1C,EAAE,EAAE,4BAA4B;IAChC,QAAQ,EAAE,OAAO;IACjB,KAAK,EAAE,CAAC,GAAoB,EAAE,IAAiB,EAAe,EAAE;QAC9D,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;QAClF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAA;QACnC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;QACxE,OAAO,OAAO;aACX,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;aACnD,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YACxB,IAAI,EAAE,4BAA4B;YAClC,QAAQ,EAAE,OAAgB;YAC1B,OAAO,EAAE,eAAe,MAAM,wBAAwB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG;YACxE,QAAQ,EAAE,EAAE;SACb,CAAC,CAAC,CAAA;IACP,CAAC;CACF,CAAA"}
package/esm/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.0.67";
1
+ export declare const version = "0.0.69";
package/esm/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // generated by scripts/inject-version.mjs — do not edit by hand
2
- export const version = '0.0.67';
2
+ export const version = '0.0.69';
3
3
  //# sourceMappingURL=version.js.map
@@ -117,11 +117,29 @@ peg$SyntaxError.buildMessage = function (expected, found) {
117
117
  function peg$parse(input, options) {
118
118
  options = options !== void 0 ? options : {};
119
119
  var peg$FAILED = {}, peg$startRuleFunctions = { start: peg$parsestart }, peg$startRuleFunction = peg$parsestart, peg$c0 = peg$anyExpectation(), peg$c1 = ':', peg$c2 = peg$literalExpectation(':', false), peg$c3 = '<', peg$c4 = peg$literalExpectation('<', false), peg$c5 = /^[^>]/, peg$c6 = peg$classExpectation(['>'], true, false), peg$c7 = '>', peg$c8 = peg$literalExpectation('>', false), peg$c9 = function (name, value) {
120
+ // only a real attribute list is checked: `<` and `>` in running text or in
121
+ // a verbatim block are not markup
122
+ const verbatim = options._blockStack.some(b => options.verbatimBlocks.indexOf(b.name) !== -1);
123
+ if (!options._inDirective || verbatim)
124
+ return null;
125
+ const advice = 'use a non-conflicting delimiter ("...", (...), <<...>>) or plain text';
126
+ // the mirror case: the value ended at a `>` written inside it, and the one
127
+ // the author meant as the closing bracket is still ahead on the line
128
+ const rest = input.slice(peg$savedPos + text().length).split(/\r?\n/)[0];
129
+ const closedEarly = rest.indexOf('>') !== -1 && !/^[ \t]*:/.test(rest);
120
130
  if (value.indexOf('<') !== -1) {
121
131
  options.diagnostics.push({
122
132
  rule: 'attr-nested-angle',
123
133
  severity: 'error',
124
- message: 'attribute value contains a nested <…> that closes the attribute early; use a non-conflicting delimiter ("...", [...], (...), <<...>>) or plain text',
134
+ message: 'attribute value contains a nested <…> that closes the attribute early; ' + advice,
135
+ location: location(),
136
+ });
137
+ }
138
+ else if (closedEarly) {
139
+ options.diagnostics.push({
140
+ rule: 'attr-nested-angle',
141
+ severity: 'error',
142
+ message: 'attribute value contains a > that closes the attribute early; ' + advice,
125
143
  location: location(),
126
144
  });
127
145
  }
@@ -172,25 +190,28 @@ function peg$parse(input, options) {
172
190
  }, peg$c16 = '=for', peg$c17 = peg$literalExpectation('=for', false), peg$c18 = function () {
173
191
  options._inDirective = true;
174
192
  return null;
175
- }, peg$c19 = function (name) {
176
- if (options._inDirective) {
193
+ }, peg$c19 = '!', peg$c20 = peg$literalExpectation('!', false), peg$c21 = function (name) {
194
+ // any verbatim block on the stack makes this line content: markers written
195
+ // inside such a block are an example, not structure
196
+ const verbatim = options._blockStack.some(b => options.verbatimBlocks.indexOf(b.name) !== -1);
197
+ if (options._inDirective && !verbatim) {
177
198
  options.diagnostics.push({
178
199
  rule: 'attr-continuation-dropped',
179
200
  severity: 'warning',
180
- message: 'attribute :' + name + '<…> on continuation line is silently dropped; flatten onto the directive line',
201
+ message: 'attribute :' + name + ' on continuation line is silently dropped; flatten onto the directive line',
181
202
  location: location(),
182
203
  });
183
204
  }
184
205
  return null;
185
- }, peg$c20 = /^[ \t]/, peg$c21 = peg$classExpectation([' ', '\t'], false, false), peg$c22 = '\n', peg$c23 = peg$literalExpectation('\n', false), peg$c24 = function () {
206
+ }, peg$c22 = '(', peg$c23 = peg$literalExpectation('(', false), peg$c24 = '{', peg$c25 = peg$literalExpectation('{', false), peg$c26 = '[', peg$c27 = peg$literalExpectation('[', false), peg$c28 = "'", peg$c29 = peg$literalExpectation("'", false), peg$c30 = '"', peg$c31 = peg$literalExpectation('"', false), peg$c32 = '\uFF62', peg$c33 = peg$literalExpectation('\uFF62', false), peg$c34 = '=', peg$c35 = peg$literalExpectation('=', false), peg$c36 = /^[ \t]/, peg$c37 = peg$classExpectation([' ', '\t'], false, false), peg$c38 = '\n', peg$c39 = peg$literalExpectation('\n', false), peg$c40 = function () {
186
207
  options._inDirective = false;
187
208
  return null;
188
- }, peg$c25 = peg$otherExpectation('identifier'), peg$c26 = /^[a-zA-Z]/, peg$c27 = peg$classExpectation([
209
+ }, peg$c41 = peg$otherExpectation('identifier'), peg$c42 = /^[a-zA-Z]/, peg$c43 = peg$classExpectation([
189
210
  ['a', 'z'],
190
211
  ['A', 'Z'],
191
- ], false, false), peg$c28 = /^[a-zA-Z0-9_\-]/, peg$c29 = peg$classExpectation([['a', 'z'], ['A', 'Z'], ['0', '9'], '_', '-'], false, false), peg$c30 = peg$otherExpectation('start-of-line'), peg$c31 = function () {
212
+ ], false, false), peg$c44 = /^[a-zA-Z0-9_\-]/, peg$c45 = peg$classExpectation([['a', 'z'], ['A', 'Z'], ['0', '9'], '_', '-'], false, false), peg$c46 = peg$otherExpectation('start-of-line'), peg$c47 = function () {
192
213
  return location().start.column === 1;
193
- }, peg$c32 = peg$otherExpectation('whitespace'), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result;
214
+ }, peg$c48 = peg$otherExpectation('whitespace'), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result;
194
215
  if ('startRule' in options) {
195
216
  if (!(options.startRule in peg$startRuleFunctions)) {
196
217
  throw new Error('Can\'t start parsing from rule "' + options.startRule + '".');
@@ -332,9 +353,12 @@ function peg$parse(input, options) {
332
353
  if (s0 === peg$FAILED) {
333
354
  s0 = peg$parsecontinuation_attr();
334
355
  if (s0 === peg$FAILED) {
335
- s0 = peg$parseblank_line_marker();
356
+ s0 = peg$parsecontinuation_marker();
336
357
  if (s0 === peg$FAILED) {
337
- s0 = peg$parseline_marker();
358
+ s0 = peg$parseblank_line_marker();
359
+ if (s0 === peg$FAILED) {
360
+ s0 = peg$parseline_marker();
361
+ }
338
362
  }
339
363
  }
340
364
  }
@@ -605,7 +629,7 @@ function peg$parse(input, options) {
605
629
  return s0;
606
630
  }
607
631
  function peg$parsecontinuation_attr() {
608
- var s0, s1, s2, s3, s4, s5;
632
+ var s0, s1, s2, s3, s4, s5, s6;
609
633
  s0 = peg$currPos;
610
634
  s1 = peg$parsesol();
611
635
  if (s1 !== peg$FAILED) {
@@ -622,22 +646,32 @@ function peg$parse(input, options) {
622
646
  }
623
647
  }
624
648
  if (s3 !== peg$FAILED) {
625
- s4 = peg$parseidentifier();
626
- if (s4 !== peg$FAILED) {
627
- if (input.charCodeAt(peg$currPos) === 60) {
628
- s5 = peg$c3;
629
- peg$currPos++;
630
- }
631
- else {
632
- s5 = peg$FAILED;
633
- if (peg$silentFails === 0) {
634
- peg$fail(peg$c4);
635
- }
649
+ if (input.charCodeAt(peg$currPos) === 33) {
650
+ s4 = peg$c19;
651
+ peg$currPos++;
652
+ }
653
+ else {
654
+ s4 = peg$FAILED;
655
+ if (peg$silentFails === 0) {
656
+ peg$fail(peg$c20);
636
657
  }
658
+ }
659
+ if (s4 === peg$FAILED) {
660
+ s4 = null;
661
+ }
662
+ if (s4 !== peg$FAILED) {
663
+ s5 = peg$parseidentifier();
637
664
  if (s5 !== peg$FAILED) {
638
- peg$savedPos = s0;
639
- s1 = peg$c19(s4);
640
- s0 = s1;
665
+ s6 = peg$parsevalue_delim();
666
+ if (s6 !== peg$FAILED) {
667
+ peg$savedPos = s0;
668
+ s1 = peg$c21(s5);
669
+ s0 = s1;
670
+ }
671
+ else {
672
+ peg$currPos = s0;
673
+ s0 = peg$FAILED;
674
+ }
641
675
  }
642
676
  else {
643
677
  peg$currPos = s0;
@@ -665,49 +699,201 @@ function peg$parse(input, options) {
665
699
  }
666
700
  return s0;
667
701
  }
702
+ function peg$parsevalue_delim() {
703
+ var s0;
704
+ if (input.charCodeAt(peg$currPos) === 60) {
705
+ s0 = peg$c3;
706
+ peg$currPos++;
707
+ }
708
+ else {
709
+ s0 = peg$FAILED;
710
+ if (peg$silentFails === 0) {
711
+ peg$fail(peg$c4);
712
+ }
713
+ }
714
+ if (s0 === peg$FAILED) {
715
+ if (input.charCodeAt(peg$currPos) === 40) {
716
+ s0 = peg$c22;
717
+ peg$currPos++;
718
+ }
719
+ else {
720
+ s0 = peg$FAILED;
721
+ if (peg$silentFails === 0) {
722
+ peg$fail(peg$c23);
723
+ }
724
+ }
725
+ if (s0 === peg$FAILED) {
726
+ if (input.charCodeAt(peg$currPos) === 123) {
727
+ s0 = peg$c24;
728
+ peg$currPos++;
729
+ }
730
+ else {
731
+ s0 = peg$FAILED;
732
+ if (peg$silentFails === 0) {
733
+ peg$fail(peg$c25);
734
+ }
735
+ }
736
+ if (s0 === peg$FAILED) {
737
+ if (input.charCodeAt(peg$currPos) === 91) {
738
+ s0 = peg$c26;
739
+ peg$currPos++;
740
+ }
741
+ else {
742
+ s0 = peg$FAILED;
743
+ if (peg$silentFails === 0) {
744
+ peg$fail(peg$c27);
745
+ }
746
+ }
747
+ if (s0 === peg$FAILED) {
748
+ if (input.charCodeAt(peg$currPos) === 39) {
749
+ s0 = peg$c28;
750
+ peg$currPos++;
751
+ }
752
+ else {
753
+ s0 = peg$FAILED;
754
+ if (peg$silentFails === 0) {
755
+ peg$fail(peg$c29);
756
+ }
757
+ }
758
+ if (s0 === peg$FAILED) {
759
+ if (input.charCodeAt(peg$currPos) === 34) {
760
+ s0 = peg$c30;
761
+ peg$currPos++;
762
+ }
763
+ else {
764
+ s0 = peg$FAILED;
765
+ if (peg$silentFails === 0) {
766
+ peg$fail(peg$c31);
767
+ }
768
+ }
769
+ if (s0 === peg$FAILED) {
770
+ if (input.charCodeAt(peg$currPos) === 65378) {
771
+ s0 = peg$c32;
772
+ peg$currPos++;
773
+ }
774
+ else {
775
+ s0 = peg$FAILED;
776
+ if (peg$silentFails === 0) {
777
+ peg$fail(peg$c33);
778
+ }
779
+ }
780
+ }
781
+ }
782
+ }
783
+ }
784
+ }
785
+ }
786
+ return s0;
787
+ }
788
+ function peg$parsecontinuation_marker() {
789
+ var s0, s1, s2, s3, s4;
790
+ s0 = peg$currPos;
791
+ s1 = peg$parsesol();
792
+ if (s1 !== peg$FAILED) {
793
+ if (input.charCodeAt(peg$currPos) === 61) {
794
+ s2 = peg$c34;
795
+ peg$currPos++;
796
+ }
797
+ else {
798
+ s2 = peg$FAILED;
799
+ if (peg$silentFails === 0) {
800
+ peg$fail(peg$c35);
801
+ }
802
+ }
803
+ if (s2 !== peg$FAILED) {
804
+ s3 = [];
805
+ if (peg$c36.test(input.charAt(peg$currPos))) {
806
+ s4 = input.charAt(peg$currPos);
807
+ peg$currPos++;
808
+ }
809
+ else {
810
+ s4 = peg$FAILED;
811
+ if (peg$silentFails === 0) {
812
+ peg$fail(peg$c37);
813
+ }
814
+ }
815
+ if (s4 !== peg$FAILED) {
816
+ while (s4 !== peg$FAILED) {
817
+ s3.push(s4);
818
+ if (peg$c36.test(input.charAt(peg$currPos))) {
819
+ s4 = input.charAt(peg$currPos);
820
+ peg$currPos++;
821
+ }
822
+ else {
823
+ s4 = peg$FAILED;
824
+ if (peg$silentFails === 0) {
825
+ peg$fail(peg$c37);
826
+ }
827
+ }
828
+ }
829
+ }
830
+ else {
831
+ s3 = peg$FAILED;
832
+ }
833
+ if (s3 !== peg$FAILED) {
834
+ peg$savedPos = s0;
835
+ s1 = peg$c18();
836
+ s0 = s1;
837
+ }
838
+ else {
839
+ peg$currPos = s0;
840
+ s0 = peg$FAILED;
841
+ }
842
+ }
843
+ else {
844
+ peg$currPos = s0;
845
+ s0 = peg$FAILED;
846
+ }
847
+ }
848
+ else {
849
+ peg$currPos = s0;
850
+ s0 = peg$FAILED;
851
+ }
852
+ return s0;
853
+ }
668
854
  function peg$parseblank_line_marker() {
669
855
  var s0, s1, s2, s3;
670
856
  s0 = peg$currPos;
671
857
  s1 = peg$parsesol();
672
858
  if (s1 !== peg$FAILED) {
673
859
  s2 = [];
674
- if (peg$c20.test(input.charAt(peg$currPos))) {
860
+ if (peg$c36.test(input.charAt(peg$currPos))) {
675
861
  s3 = input.charAt(peg$currPos);
676
862
  peg$currPos++;
677
863
  }
678
864
  else {
679
865
  s3 = peg$FAILED;
680
866
  if (peg$silentFails === 0) {
681
- peg$fail(peg$c21);
867
+ peg$fail(peg$c37);
682
868
  }
683
869
  }
684
870
  while (s3 !== peg$FAILED) {
685
871
  s2.push(s3);
686
- if (peg$c20.test(input.charAt(peg$currPos))) {
872
+ if (peg$c36.test(input.charAt(peg$currPos))) {
687
873
  s3 = input.charAt(peg$currPos);
688
874
  peg$currPos++;
689
875
  }
690
876
  else {
691
877
  s3 = peg$FAILED;
692
878
  if (peg$silentFails === 0) {
693
- peg$fail(peg$c21);
879
+ peg$fail(peg$c37);
694
880
  }
695
881
  }
696
882
  }
697
883
  if (s2 !== peg$FAILED) {
698
884
  if (input.charCodeAt(peg$currPos) === 10) {
699
- s3 = peg$c22;
885
+ s3 = peg$c38;
700
886
  peg$currPos++;
701
887
  }
702
888
  else {
703
889
  s3 = peg$FAILED;
704
890
  if (peg$silentFails === 0) {
705
- peg$fail(peg$c23);
891
+ peg$fail(peg$c39);
706
892
  }
707
893
  }
708
894
  if (s3 !== peg$FAILED) {
709
895
  peg$savedPos = s0;
710
- s1 = peg$c24();
896
+ s1 = peg$c40();
711
897
  s0 = s1;
712
898
  }
713
899
  else {
@@ -743,7 +929,7 @@ function peg$parse(input, options) {
743
929
  }
744
930
  if (s2 !== peg$FAILED) {
745
931
  peg$savedPos = s0;
746
- s1 = peg$c24();
932
+ s1 = peg$c40();
747
933
  s0 = s1;
748
934
  }
749
935
  else {
@@ -762,38 +948,38 @@ function peg$parse(input, options) {
762
948
  peg$silentFails++;
763
949
  s0 = peg$currPos;
764
950
  s1 = peg$currPos;
765
- if (peg$c26.test(input.charAt(peg$currPos))) {
951
+ if (peg$c42.test(input.charAt(peg$currPos))) {
766
952
  s2 = input.charAt(peg$currPos);
767
953
  peg$currPos++;
768
954
  }
769
955
  else {
770
956
  s2 = peg$FAILED;
771
957
  if (peg$silentFails === 0) {
772
- peg$fail(peg$c27);
958
+ peg$fail(peg$c43);
773
959
  }
774
960
  }
775
961
  if (s2 !== peg$FAILED) {
776
962
  s3 = [];
777
- if (peg$c28.test(input.charAt(peg$currPos))) {
963
+ if (peg$c44.test(input.charAt(peg$currPos))) {
778
964
  s4 = input.charAt(peg$currPos);
779
965
  peg$currPos++;
780
966
  }
781
967
  else {
782
968
  s4 = peg$FAILED;
783
969
  if (peg$silentFails === 0) {
784
- peg$fail(peg$c29);
970
+ peg$fail(peg$c45);
785
971
  }
786
972
  }
787
973
  while (s4 !== peg$FAILED) {
788
974
  s3.push(s4);
789
- if (peg$c28.test(input.charAt(peg$currPos))) {
975
+ if (peg$c44.test(input.charAt(peg$currPos))) {
790
976
  s4 = input.charAt(peg$currPos);
791
977
  peg$currPos++;
792
978
  }
793
979
  else {
794
980
  s4 = peg$FAILED;
795
981
  if (peg$silentFails === 0) {
796
- peg$fail(peg$c29);
982
+ peg$fail(peg$c45);
797
983
  }
798
984
  }
799
985
  }
@@ -820,7 +1006,7 @@ function peg$parse(input, options) {
820
1006
  if (s0 === peg$FAILED) {
821
1007
  s1 = peg$FAILED;
822
1008
  if (peg$silentFails === 0) {
823
- peg$fail(peg$c25);
1009
+ peg$fail(peg$c41);
824
1010
  }
825
1011
  }
826
1012
  return s0;
@@ -829,7 +1015,7 @@ function peg$parse(input, options) {
829
1015
  var s0, s1;
830
1016
  peg$silentFails++;
831
1017
  peg$savedPos = peg$currPos;
832
- s0 = peg$c31();
1018
+ s0 = peg$c47();
833
1019
  if (s0) {
834
1020
  s0 = void 0;
835
1021
  }
@@ -840,7 +1026,7 @@ function peg$parse(input, options) {
840
1026
  if (s0 === peg$FAILED) {
841
1027
  s1 = peg$FAILED;
842
1028
  if (peg$silentFails === 0) {
843
- peg$fail(peg$c30);
1029
+ peg$fail(peg$c46);
844
1030
  }
845
1031
  }
846
1032
  return s0;
@@ -849,27 +1035,27 @@ function peg$parse(input, options) {
849
1035
  var s0, s1;
850
1036
  peg$silentFails++;
851
1037
  s0 = [];
852
- if (peg$c20.test(input.charAt(peg$currPos))) {
1038
+ if (peg$c36.test(input.charAt(peg$currPos))) {
853
1039
  s1 = input.charAt(peg$currPos);
854
1040
  peg$currPos++;
855
1041
  }
856
1042
  else {
857
1043
  s1 = peg$FAILED;
858
1044
  if (peg$silentFails === 0) {
859
- peg$fail(peg$c21);
1045
+ peg$fail(peg$c37);
860
1046
  }
861
1047
  }
862
1048
  if (s1 !== peg$FAILED) {
863
1049
  while (s1 !== peg$FAILED) {
864
1050
  s0.push(s1);
865
- if (peg$c20.test(input.charAt(peg$currPos))) {
1051
+ if (peg$c36.test(input.charAt(peg$currPos))) {
866
1052
  s1 = input.charAt(peg$currPos);
867
1053
  peg$currPos++;
868
1054
  }
869
1055
  else {
870
1056
  s1 = peg$FAILED;
871
1057
  if (peg$silentFails === 0) {
872
- peg$fail(peg$c21);
1058
+ peg$fail(peg$c37);
873
1059
  }
874
1060
  }
875
1061
  }
@@ -881,13 +1067,14 @@ function peg$parse(input, options) {
881
1067
  if (s0 === peg$FAILED) {
882
1068
  s1 = peg$FAILED;
883
1069
  if (peg$silentFails === 0) {
884
- peg$fail(peg$c32);
1070
+ peg$fail(peg$c48);
885
1071
  }
886
1072
  }
887
1073
  return s0;
888
1074
  }
889
1075
  options.diagnostics = options.diagnostics || [];
890
1076
  options._blockStack = options._blockStack || [];
1077
+ options.verbatimBlocks = options.verbatimBlocks || [];
891
1078
  if (typeof options._inDirective !== 'boolean')
892
1079
  options._inDirective = false;
893
1080
  peg$result = peg$startRuleFunction();