@gmb/bitmark-parser-generator 1.30.0 → 1.32.0

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 (97) hide show
  1. package/dist/browser/bitmark-parser-generator.min.js +1 -1
  2. package/dist/browser/bundle-report.html +2 -2
  3. package/dist/cjs/ast/Builder.js +3 -2
  4. package/dist/cjs/ast/Builder.js.map +1 -1
  5. package/dist/cjs/config/raw/bits.js +1 -0
  6. package/dist/cjs/config/raw/bits.js.map +1 -1
  7. package/dist/cjs/config/raw/groups.js +10 -0
  8. package/dist/cjs/config/raw/groups.js.map +1 -1
  9. package/dist/cjs/config/raw/properties.js +5 -0
  10. package/dist/cjs/config/raw/properties.js.map +1 -1
  11. package/dist/cjs/generated/build-info.js +1 -1
  12. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js +1 -1
  13. package/dist/cjs/generated/parser/text/text-peggy-parser.js +147 -174
  14. package/dist/cjs/generated/parser/text/text-peggy-parser.js.map +1 -1
  15. package/dist/cjs/generator/bitmark/BitmarkGenerator.js +29 -0
  16. package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -1
  17. package/dist/cjs/generator/json/JsonGenerator.js +24 -3
  18. package/dist/cjs/generator/json/JsonGenerator.js.map +1 -1
  19. package/dist/cjs/model/ast/NodeType.js +2 -0
  20. package/dist/cjs/model/ast/NodeType.js.map +1 -1
  21. package/dist/cjs/model/config/enum/PropertyConfigKey.js +1 -0
  22. package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +1 -1
  23. package/dist/cjs/model/enum/BitType.js +1 -0
  24. package/dist/cjs/model/enum/BitType.js.map +1 -1
  25. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +6 -3
  26. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
  27. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -1
  28. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +6 -0
  29. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
  30. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +18 -2
  31. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
  32. package/dist/cjs/parser/json/JsonParser.js +13 -3
  33. package/dist/cjs/parser/json/JsonParser.js.map +1 -1
  34. package/dist/esm/ast/Builder.js +3 -2
  35. package/dist/esm/ast/Builder.js.map +1 -1
  36. package/dist/esm/config/raw/bits.js +1 -0
  37. package/dist/esm/config/raw/bits.js.map +1 -1
  38. package/dist/esm/config/raw/groups.js +10 -0
  39. package/dist/esm/config/raw/groups.js.map +1 -1
  40. package/dist/esm/config/raw/properties.js +5 -0
  41. package/dist/esm/config/raw/properties.js.map +1 -1
  42. package/dist/esm/generated/build-info.js +1 -1
  43. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js +1 -1
  44. package/dist/esm/generated/parser/text/text-peggy-parser.js +147 -174
  45. package/dist/esm/generated/parser/text/text-peggy-parser.js.map +1 -1
  46. package/dist/esm/generator/bitmark/BitmarkGenerator.js +29 -0
  47. package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -1
  48. package/dist/esm/generator/json/JsonGenerator.js +24 -3
  49. package/dist/esm/generator/json/JsonGenerator.js.map +1 -1
  50. package/dist/esm/model/ast/NodeType.js +2 -0
  51. package/dist/esm/model/ast/NodeType.js.map +1 -1
  52. package/dist/esm/model/config/enum/PropertyConfigKey.js +1 -0
  53. package/dist/esm/model/config/enum/PropertyConfigKey.js.map +1 -1
  54. package/dist/esm/model/enum/BitType.js +1 -0
  55. package/dist/esm/model/enum/BitType.js.map +1 -1
  56. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +6 -3
  57. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
  58. package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -1
  59. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +6 -0
  60. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
  61. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +17 -2
  62. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
  63. package/dist/esm/parser/json/JsonParser.js +13 -3
  64. package/dist/esm/parser/json/JsonParser.js.map +1 -1
  65. package/dist/types/ast/Builder.d.ts +2 -1
  66. package/dist/types/ast/Builder.d.ts.map +1 -1
  67. package/dist/types/config/raw/bits.d.ts.map +1 -1
  68. package/dist/types/config/raw/groups.d.ts.map +1 -1
  69. package/dist/types/config/raw/properties.d.ts.map +1 -1
  70. package/dist/types/generated/parser/text/text-peggy-parser.d.ts.map +1 -1
  71. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +3 -0
  72. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +1 -1
  73. package/dist/types/generator/json/JsonGenerator.d.ts +1 -0
  74. package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -1
  75. package/dist/types/model/ast/NodeType.d.ts +4 -0
  76. package/dist/types/model/ast/NodeType.d.ts.map +1 -1
  77. package/dist/types/model/ast/Nodes.d.ts +2 -1
  78. package/dist/types/model/ast/Nodes.d.ts.map +1 -1
  79. package/dist/types/model/config/enum/ConfigKey.d.ts +2 -0
  80. package/dist/types/model/config/enum/ConfigKey.d.ts.map +1 -1
  81. package/dist/types/model/config/enum/PropertyConfigKey.d.ts +3 -0
  82. package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +1 -1
  83. package/dist/types/model/enum/BitType.d.ts +2 -0
  84. package/dist/types/model/enum/BitType.d.ts.map +1 -1
  85. package/dist/types/model/enum/PropertyTag.d.ts +2 -0
  86. package/dist/types/model/enum/PropertyTag.d.ts.map +1 -1
  87. package/dist/types/model/json/BitJson.d.ts +2 -1
  88. package/dist/types/model/json/BitJson.d.ts.map +1 -1
  89. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -1
  90. package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +3 -0
  91. package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +1 -1
  92. package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +1 -1
  93. package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +4 -2
  94. package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +1 -1
  95. package/dist/types/parser/json/JsonParser.d.ts +1 -0
  96. package/dist/types/parser/json/JsonParser.d.ts.map +1 -1
  97. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
- // @generated by Peggy 4.0.3.
1
+ // @generated by Peggy 4.1.1.
2
2
  //
3
3
  // https://peggyjs.org/
4
4
  import { Breakscape } from "../../../breakscaping/Breakscape";
5
- const VERSION = "8.16.0";
5
+ const VERSION = "8.17.1";
6
6
  //Parser peggy.js
7
7
  // parser options (parameter when running parser):
8
8
  // allowedStartRules: ["bitmarkPlusPlus", "bitmarkPlus", "bitmarkMinusMinus", "bitmarkPlusString", "bitmarkMinusMinusString"]
@@ -10,10 +10,8 @@ const VERSION = "8.16.0";
10
10
  // The public rules return a full StyledText object. This means things got consitent to handle. However, this means, there is always at least one block (a paragraph in case of bitmark+ and bitmark--) present.
11
11
  // Todos
12
12
  // - JSON for color
13
- // - LaTeX and MathML embed
14
- // The formula == x = {-b \pm \sqrt{b^2-4ac} \over 2a} ==|math:LaTeX| is inline.
15
- // The formula == $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ ==|math:LaTeX| is inline.
16
- // The formula == x = {-b \pm \sqrt{b^2-4ac} \over 2a} ==|math:MathML| is inline.
13
+ // - LaTeX embed
14
+ // The formula == $$ p \\left( x | y \\right) $$ ==|math:LaTeX| is inline.
17
15
  /*
18
16
 
19
17
  Empty StyledString
@@ -673,13 +671,14 @@ function peg$parse(input, options) {
673
671
  var peg$f77 = function (str) { return { type: "comment", comment: str }; };
674
672
  var peg$f78 = function (bs) { return [{ type: 'paragraph', content: bs, attrs: {} }]; };
675
673
  var peg$f79 = function (first, more) { return first ? [first, ...more.flat()] : more.flat(); };
676
- var peg$f80 = function (t) { return { text: unbreakscape(t), type: "text" }; };
677
- var peg$f81 = function (t) { return { index: +t, type: "bit" }; };
678
- var peg$f82 = function (t) { return { marks: [{ type: "bold" }], text: unbreakscape(t), type: "text" }; };
679
- var peg$f83 = function (t) { return { marks: [{ type: "italic" }], text: unbreakscape(t), type: "text" }; };
680
- var peg$f84 = function (t) { return { marks: [{ type: "light" }], text: unbreakscape(t), type: "text" }; };
681
- var peg$f85 = function (t) { return { marks: [{ type: "highlight" }], text: unbreakscape(t), type: "text" }; };
682
- var peg$f86 = function (pr, t) { return { pr, t }; };
674
+ var peg$f80 = function (t) { return { "type": "hardBreak" }; };
675
+ var peg$f81 = function (t) { return { text: unbreakscape(t), type: "text" }; };
676
+ var peg$f82 = function (t) { return { index: +t, type: "bit" }; };
677
+ var peg$f83 = function (t) { return { marks: [{ type: "bold" }], text: unbreakscape(t), type: "text" }; };
678
+ var peg$f84 = function (t) { return { marks: [{ type: "italic" }], text: unbreakscape(t), type: "text" }; };
679
+ var peg$f85 = function (t) { return { marks: [{ type: "light" }], text: unbreakscape(t), type: "text" }; };
680
+ var peg$f86 = function (t) { return { marks: [{ type: "highlight" }], text: unbreakscape(t), type: "text" }; };
681
+ var peg$f87 = function (pr, t) { return { pr, t }; };
683
682
  var peg$currPos = options.peg$currPos | 0;
684
683
  var peg$savedPos = peg$currPos;
685
684
  var peg$posDetailsCache = [{ line: 1, column: 1 }];
@@ -7078,80 +7077,64 @@ function peg$parse(input, options) {
7078
7077
  function peg$parsePlainText() {
7079
7078
  var s0, s1, s2, s3, s4, s5, s6;
7080
7079
  s0 = peg$currPos;
7081
- s1 = peg$currPos;
7082
- s2 = [];
7083
- s3 = peg$currPos;
7084
- s4 = peg$parseTagTags();
7085
- if (s4 === peg$FAILED) {
7086
- s4 = null;
7087
- }
7088
- s5 = peg$currPos;
7089
- peg$silentFails++;
7090
- s6 = peg$parseStyledText();
7091
- peg$silentFails--;
7092
- if (s6 === peg$FAILED) {
7093
- s5 = undefined;
7094
- }
7095
- else {
7096
- peg$currPos = s5;
7097
- s5 = peg$FAILED;
7080
+ s1 = peg$parseNL();
7081
+ if (s1 !== peg$FAILED) {
7082
+ peg$savedPos = s0;
7083
+ s1 = peg$f80(s1);
7098
7084
  }
7099
- if (s5 !== peg$FAILED) {
7100
- if (input.length > peg$currPos) {
7101
- s6 = input.charAt(peg$currPos);
7102
- peg$currPos++;
7085
+ s0 = s1;
7086
+ if (s0 === peg$FAILED) {
7087
+ s0 = peg$currPos;
7088
+ s1 = peg$currPos;
7089
+ s2 = [];
7090
+ s3 = peg$currPos;
7091
+ s4 = peg$parseTagTags();
7092
+ if (s4 === peg$FAILED) {
7093
+ s4 = null;
7094
+ }
7095
+ s5 = peg$currPos;
7096
+ peg$silentFails++;
7097
+ s6 = peg$parseStyledText();
7098
+ peg$silentFails--;
7099
+ if (s6 === peg$FAILED) {
7100
+ s5 = undefined;
7103
7101
  }
7104
7102
  else {
7105
- s6 = peg$FAILED;
7106
- if (peg$silentFails === 0) {
7107
- peg$fail(peg$e0);
7108
- }
7103
+ peg$currPos = s5;
7104
+ s5 = peg$FAILED;
7109
7105
  }
7110
- if (s6 !== peg$FAILED) {
7111
- s4 = [s4, s5, s6];
7112
- s3 = s4;
7106
+ if (s5 !== peg$FAILED) {
7107
+ s6 = peg$parsechar();
7108
+ if (s6 !== peg$FAILED) {
7109
+ s4 = [s4, s5, s6];
7110
+ s3 = s4;
7111
+ }
7112
+ else {
7113
+ peg$currPos = s3;
7114
+ s3 = peg$FAILED;
7115
+ }
7113
7116
  }
7114
7117
  else {
7115
7118
  peg$currPos = s3;
7116
7119
  s3 = peg$FAILED;
7117
7120
  }
7118
- }
7119
- else {
7120
- peg$currPos = s3;
7121
- s3 = peg$FAILED;
7122
- }
7123
- if (s3 !== peg$FAILED) {
7124
- while (s3 !== peg$FAILED) {
7125
- s2.push(s3);
7121
+ if (s3 === peg$FAILED) {
7126
7122
  s3 = peg$currPos;
7127
7123
  s4 = peg$parseTagTags();
7128
- if (s4 === peg$FAILED) {
7129
- s4 = null;
7130
- }
7131
- s5 = peg$currPos;
7132
- peg$silentFails++;
7133
- s6 = peg$parseStyledText();
7134
- peg$silentFails--;
7135
- if (s6 === peg$FAILED) {
7136
- s5 = undefined;
7137
- }
7138
- else {
7139
- peg$currPos = s5;
7140
- s5 = peg$FAILED;
7141
- }
7142
- if (s5 !== peg$FAILED) {
7143
- if (input.length > peg$currPos) {
7144
- s6 = input.charAt(peg$currPos);
7145
- peg$currPos++;
7124
+ if (s4 !== peg$FAILED) {
7125
+ s5 = peg$currPos;
7126
+ peg$silentFails++;
7127
+ s6 = peg$parseStyledText();
7128
+ peg$silentFails--;
7129
+ if (s6 === peg$FAILED) {
7130
+ s5 = undefined;
7146
7131
  }
7147
7132
  else {
7148
- s6 = peg$FAILED;
7149
- if (peg$silentFails === 0) {
7150
- peg$fail(peg$e0);
7151
- }
7133
+ peg$currPos = s5;
7134
+ s5 = peg$FAILED;
7152
7135
  }
7153
- if (s6 !== peg$FAILED) {
7154
- s4 = [s4, s5, s6];
7136
+ if (s5 !== peg$FAILED) {
7137
+ s4 = [s4, s5];
7155
7138
  s3 = s4;
7156
7139
  }
7157
7140
  else {
@@ -7164,23 +7147,85 @@ function peg$parse(input, options) {
7164
7147
  s3 = peg$FAILED;
7165
7148
  }
7166
7149
  }
7167
- }
7168
- else {
7169
- s2 = peg$FAILED;
7170
- }
7171
- if (s2 !== peg$FAILED) {
7172
- s1 = input.substring(s1, peg$currPos);
7173
- }
7174
- else {
7175
- s1 = s2;
7176
- }
7177
- if (s1 !== peg$FAILED) {
7178
- peg$savedPos = s0;
7179
- s1 = peg$f80(s1);
7180
- }
7181
- s0 = s1;
7182
- if (s0 === peg$FAILED) {
7183
- s0 = peg$parseNL();
7150
+ if (s3 !== peg$FAILED) {
7151
+ while (s3 !== peg$FAILED) {
7152
+ s2.push(s3);
7153
+ s3 = peg$currPos;
7154
+ s4 = peg$parseTagTags();
7155
+ if (s4 === peg$FAILED) {
7156
+ s4 = null;
7157
+ }
7158
+ s5 = peg$currPos;
7159
+ peg$silentFails++;
7160
+ s6 = peg$parseStyledText();
7161
+ peg$silentFails--;
7162
+ if (s6 === peg$FAILED) {
7163
+ s5 = undefined;
7164
+ }
7165
+ else {
7166
+ peg$currPos = s5;
7167
+ s5 = peg$FAILED;
7168
+ }
7169
+ if (s5 !== peg$FAILED) {
7170
+ s6 = peg$parsechar();
7171
+ if (s6 !== peg$FAILED) {
7172
+ s4 = [s4, s5, s6];
7173
+ s3 = s4;
7174
+ }
7175
+ else {
7176
+ peg$currPos = s3;
7177
+ s3 = peg$FAILED;
7178
+ }
7179
+ }
7180
+ else {
7181
+ peg$currPos = s3;
7182
+ s3 = peg$FAILED;
7183
+ }
7184
+ if (s3 === peg$FAILED) {
7185
+ s3 = peg$currPos;
7186
+ s4 = peg$parseTagTags();
7187
+ if (s4 !== peg$FAILED) {
7188
+ s5 = peg$currPos;
7189
+ peg$silentFails++;
7190
+ s6 = peg$parseStyledText();
7191
+ peg$silentFails--;
7192
+ if (s6 === peg$FAILED) {
7193
+ s5 = undefined;
7194
+ }
7195
+ else {
7196
+ peg$currPos = s5;
7197
+ s5 = peg$FAILED;
7198
+ }
7199
+ if (s5 !== peg$FAILED) {
7200
+ s4 = [s4, s5];
7201
+ s3 = s4;
7202
+ }
7203
+ else {
7204
+ peg$currPos = s3;
7205
+ s3 = peg$FAILED;
7206
+ }
7207
+ }
7208
+ else {
7209
+ peg$currPos = s3;
7210
+ s3 = peg$FAILED;
7211
+ }
7212
+ }
7213
+ }
7214
+ }
7215
+ else {
7216
+ s2 = peg$FAILED;
7217
+ }
7218
+ if (s2 !== peg$FAILED) {
7219
+ s1 = input.substring(s1, peg$currPos);
7220
+ }
7221
+ else {
7222
+ s1 = s2;
7223
+ }
7224
+ if (s1 !== peg$FAILED) {
7225
+ peg$savedPos = s0;
7226
+ s1 = peg$f81(s1);
7227
+ }
7228
+ s0 = s1;
7184
7229
  }
7185
7230
  return s0;
7186
7231
  }
@@ -7397,7 +7442,7 @@ function peg$parse(input, options) {
7397
7442
  s3 = peg$parseBodyBitCloseTag();
7398
7443
  if (s3 !== peg$FAILED) {
7399
7444
  peg$savedPos = s0;
7400
- s0 = peg$f81(s2);
7445
+ s0 = peg$f82(s2);
7401
7446
  }
7402
7447
  else {
7403
7448
  peg$currPos = s0;
@@ -7568,7 +7613,7 @@ function peg$parse(input, options) {
7568
7613
  s5 = peg$parseBoldTag();
7569
7614
  if (s5 !== peg$FAILED) {
7570
7615
  peg$savedPos = s0;
7571
- s0 = peg$f82(s3);
7616
+ s0 = peg$f83(s3);
7572
7617
  }
7573
7618
  else {
7574
7619
  peg$currPos = s0;
@@ -7734,7 +7779,7 @@ function peg$parse(input, options) {
7734
7779
  s5 = peg$parseItalicTag();
7735
7780
  if (s5 !== peg$FAILED) {
7736
7781
  peg$savedPos = s0;
7737
- s0 = peg$f83(s3);
7782
+ s0 = peg$f84(s3);
7738
7783
  }
7739
7784
  else {
7740
7785
  peg$currPos = s0;
@@ -7900,7 +7945,7 @@ function peg$parse(input, options) {
7900
7945
  s5 = peg$parseLightTag();
7901
7946
  if (s5 !== peg$FAILED) {
7902
7947
  peg$savedPos = s0;
7903
- s0 = peg$f84(s3);
7948
+ s0 = peg$f85(s3);
7904
7949
  }
7905
7950
  else {
7906
7951
  peg$currPos = s0;
@@ -8066,7 +8111,7 @@ function peg$parse(input, options) {
8066
8111
  s5 = peg$parseHighlightTag();
8067
8112
  if (s5 !== peg$FAILED) {
8068
8113
  peg$savedPos = s0;
8069
- s0 = peg$f85(s3);
8114
+ s0 = peg$f86(s3);
8070
8115
  }
8071
8116
  else {
8072
8117
  peg$currPos = s0;
@@ -8087,14 +8132,14 @@ function peg$parse(input, options) {
8087
8132
  var s0, s1, s2, s3, s4;
8088
8133
  s0 = peg$currPos;
8089
8134
  s1 = peg$currPos;
8090
- s2 = peg$parseBoldTag();
8135
+ s2 = peg$parseLightTag();
8091
8136
  if (s2 !== peg$FAILED) {
8092
8137
  s3 = [];
8093
- s4 = peg$parseBoldHalfTag();
8138
+ s4 = peg$parseLightHalfTag();
8094
8139
  if (s4 !== peg$FAILED) {
8095
8140
  while (s4 !== peg$FAILED) {
8096
8141
  s3.push(s4);
8097
- s4 = peg$parseBoldHalfTag();
8142
+ s4 = peg$parseLightHalfTag();
8098
8143
  }
8099
8144
  }
8100
8145
  else {
@@ -8122,14 +8167,14 @@ function peg$parse(input, options) {
8122
8167
  if (s0 === peg$FAILED) {
8123
8168
  s0 = peg$currPos;
8124
8169
  s1 = peg$currPos;
8125
- s2 = peg$parseItalicTag();
8170
+ s2 = peg$parseHighlightTag();
8126
8171
  if (s2 !== peg$FAILED) {
8127
8172
  s3 = [];
8128
- s4 = peg$parseItalicHalfTag();
8173
+ s4 = peg$parseHighlightHalfTag();
8129
8174
  if (s4 !== peg$FAILED) {
8130
8175
  while (s4 !== peg$FAILED) {
8131
8176
  s3.push(s4);
8132
- s4 = peg$parseItalicHalfTag();
8177
+ s4 = peg$parseHighlightHalfTag();
8133
8178
  }
8134
8179
  }
8135
8180
  else {
@@ -8154,78 +8199,6 @@ function peg$parse(input, options) {
8154
8199
  else {
8155
8200
  s0 = s1;
8156
8201
  }
8157
- if (s0 === peg$FAILED) {
8158
- s0 = peg$currPos;
8159
- s1 = peg$currPos;
8160
- s2 = peg$parseLightTag();
8161
- if (s2 !== peg$FAILED) {
8162
- s3 = [];
8163
- s4 = peg$parseLightHalfTag();
8164
- if (s4 !== peg$FAILED) {
8165
- while (s4 !== peg$FAILED) {
8166
- s3.push(s4);
8167
- s4 = peg$parseLightHalfTag();
8168
- }
8169
- }
8170
- else {
8171
- s3 = peg$FAILED;
8172
- }
8173
- if (s3 !== peg$FAILED) {
8174
- s2 = [s2, s3];
8175
- s1 = s2;
8176
- }
8177
- else {
8178
- peg$currPos = s1;
8179
- s1 = peg$FAILED;
8180
- }
8181
- }
8182
- else {
8183
- peg$currPos = s1;
8184
- s1 = peg$FAILED;
8185
- }
8186
- if (s1 !== peg$FAILED) {
8187
- s0 = input.substring(s0, peg$currPos);
8188
- }
8189
- else {
8190
- s0 = s1;
8191
- }
8192
- if (s0 === peg$FAILED) {
8193
- s0 = peg$currPos;
8194
- s1 = peg$currPos;
8195
- s2 = peg$parseHighlightTag();
8196
- if (s2 !== peg$FAILED) {
8197
- s3 = [];
8198
- s4 = peg$parseHighlightHalfTag();
8199
- if (s4 !== peg$FAILED) {
8200
- while (s4 !== peg$FAILED) {
8201
- s3.push(s4);
8202
- s4 = peg$parseHighlightHalfTag();
8203
- }
8204
- }
8205
- else {
8206
- s3 = peg$FAILED;
8207
- }
8208
- if (s3 !== peg$FAILED) {
8209
- s2 = [s2, s3];
8210
- s1 = s2;
8211
- }
8212
- else {
8213
- peg$currPos = s1;
8214
- s1 = peg$FAILED;
8215
- }
8216
- }
8217
- else {
8218
- peg$currPos = s1;
8219
- s1 = peg$FAILED;
8220
- }
8221
- if (s1 !== peg$FAILED) {
8222
- s0 = input.substring(s0, peg$currPos);
8223
- }
8224
- else {
8225
- s0 = s1;
8226
- }
8227
- }
8228
- }
8229
8202
  }
8230
8203
  return s0;
8231
8204
  }
@@ -8698,7 +8671,7 @@ function peg$parse(input, options) {
8698
8671
  }
8699
8672
  s2 = input.substring(s2, peg$currPos);
8700
8673
  peg$savedPos = s0;
8701
- s0 = peg$f86(s1, s2);
8674
+ s0 = peg$f87(s1, s2);
8702
8675
  }
8703
8676
  else {
8704
8677
  peg$currPos = s0;