@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,5 +1,5 @@
1
1
  "use strict";
2
- // @generated by Peggy 4.0.3.
2
+ // @generated by Peggy 4.1.1.
3
3
  //
4
4
  // https://peggyjs.org/
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,7 +7,7 @@ exports.StartRules = void 0;
7
7
  exports.SyntaxError = peg$SyntaxError;
8
8
  exports.parse = peg$parse;
9
9
  const Breakscape_1 = require("../../../breakscaping/Breakscape");
10
- const VERSION = "8.16.0";
10
+ const VERSION = "8.17.1";
11
11
  //Parser peggy.js
12
12
  // parser options (parameter when running parser):
13
13
  // allowedStartRules: ["bitmarkPlusPlus", "bitmarkPlus", "bitmarkMinusMinus", "bitmarkPlusString", "bitmarkMinusMinusString"]
@@ -15,10 +15,8 @@ const VERSION = "8.16.0";
15
15
  // 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.
16
16
  // Todos
17
17
  // - JSON for color
18
- // - LaTeX and MathML embed
19
- // The formula == x = {-b \pm \sqrt{b^2-4ac} \over 2a} ==|math:LaTeX| is inline.
20
- // The formula == $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ ==|math:LaTeX| is inline.
21
- // The formula == x = {-b \pm \sqrt{b^2-4ac} \over 2a} ==|math:MathML| is inline.
18
+ // - LaTeX embed
19
+ // The formula == $$ p \\left( x | y \\right) $$ ==|math:LaTeX| is inline.
22
20
  /*
23
21
 
24
22
  Empty StyledString
@@ -678,13 +676,14 @@ function peg$parse(input, options) {
678
676
  var peg$f77 = function (str) { return { type: "comment", comment: str }; };
679
677
  var peg$f78 = function (bs) { return [{ type: 'paragraph', content: bs, attrs: {} }]; };
680
678
  var peg$f79 = function (first, more) { return first ? [first, ...more.flat()] : more.flat(); };
681
- var peg$f80 = function (t) { return { text: unbreakscape(t), type: "text" }; };
682
- var peg$f81 = function (t) { return { index: +t, type: "bit" }; };
683
- var peg$f82 = function (t) { return { marks: [{ type: "bold" }], text: unbreakscape(t), type: "text" }; };
684
- var peg$f83 = function (t) { return { marks: [{ type: "italic" }], text: unbreakscape(t), type: "text" }; };
685
- var peg$f84 = function (t) { return { marks: [{ type: "light" }], text: unbreakscape(t), type: "text" }; };
686
- var peg$f85 = function (t) { return { marks: [{ type: "highlight" }], text: unbreakscape(t), type: "text" }; };
687
- var peg$f86 = function (pr, t) { return { pr, t }; };
679
+ var peg$f80 = function (t) { return { "type": "hardBreak" }; };
680
+ var peg$f81 = function (t) { return { text: unbreakscape(t), type: "text" }; };
681
+ var peg$f82 = function (t) { return { index: +t, type: "bit" }; };
682
+ var peg$f83 = function (t) { return { marks: [{ type: "bold" }], text: unbreakscape(t), type: "text" }; };
683
+ var peg$f84 = function (t) { return { marks: [{ type: "italic" }], text: unbreakscape(t), type: "text" }; };
684
+ var peg$f85 = function (t) { return { marks: [{ type: "light" }], text: unbreakscape(t), type: "text" }; };
685
+ var peg$f86 = function (t) { return { marks: [{ type: "highlight" }], text: unbreakscape(t), type: "text" }; };
686
+ var peg$f87 = function (pr, t) { return { pr, t }; };
688
687
  var peg$currPos = options.peg$currPos | 0;
689
688
  var peg$savedPos = peg$currPos;
690
689
  var peg$posDetailsCache = [{ line: 1, column: 1 }];
@@ -7083,80 +7082,64 @@ function peg$parse(input, options) {
7083
7082
  function peg$parsePlainText() {
7084
7083
  var s0, s1, s2, s3, s4, s5, s6;
7085
7084
  s0 = peg$currPos;
7086
- s1 = peg$currPos;
7087
- s2 = [];
7088
- s3 = peg$currPos;
7089
- s4 = peg$parseTagTags();
7090
- if (s4 === peg$FAILED) {
7091
- s4 = null;
7092
- }
7093
- s5 = peg$currPos;
7094
- peg$silentFails++;
7095
- s6 = peg$parseStyledText();
7096
- peg$silentFails--;
7097
- if (s6 === peg$FAILED) {
7098
- s5 = undefined;
7099
- }
7100
- else {
7101
- peg$currPos = s5;
7102
- s5 = peg$FAILED;
7085
+ s1 = peg$parseNL();
7086
+ if (s1 !== peg$FAILED) {
7087
+ peg$savedPos = s0;
7088
+ s1 = peg$f80(s1);
7103
7089
  }
7104
- if (s5 !== peg$FAILED) {
7105
- if (input.length > peg$currPos) {
7106
- s6 = input.charAt(peg$currPos);
7107
- peg$currPos++;
7090
+ s0 = s1;
7091
+ if (s0 === peg$FAILED) {
7092
+ s0 = peg$currPos;
7093
+ s1 = peg$currPos;
7094
+ s2 = [];
7095
+ s3 = peg$currPos;
7096
+ s4 = peg$parseTagTags();
7097
+ if (s4 === peg$FAILED) {
7098
+ s4 = null;
7099
+ }
7100
+ s5 = peg$currPos;
7101
+ peg$silentFails++;
7102
+ s6 = peg$parseStyledText();
7103
+ peg$silentFails--;
7104
+ if (s6 === peg$FAILED) {
7105
+ s5 = undefined;
7108
7106
  }
7109
7107
  else {
7110
- s6 = peg$FAILED;
7111
- if (peg$silentFails === 0) {
7112
- peg$fail(peg$e0);
7113
- }
7108
+ peg$currPos = s5;
7109
+ s5 = peg$FAILED;
7114
7110
  }
7115
- if (s6 !== peg$FAILED) {
7116
- s4 = [s4, s5, s6];
7117
- s3 = s4;
7111
+ if (s5 !== peg$FAILED) {
7112
+ s6 = peg$parsechar();
7113
+ if (s6 !== peg$FAILED) {
7114
+ s4 = [s4, s5, s6];
7115
+ s3 = s4;
7116
+ }
7117
+ else {
7118
+ peg$currPos = s3;
7119
+ s3 = peg$FAILED;
7120
+ }
7118
7121
  }
7119
7122
  else {
7120
7123
  peg$currPos = s3;
7121
7124
  s3 = peg$FAILED;
7122
7125
  }
7123
- }
7124
- else {
7125
- peg$currPos = s3;
7126
- s3 = peg$FAILED;
7127
- }
7128
- if (s3 !== peg$FAILED) {
7129
- while (s3 !== peg$FAILED) {
7130
- s2.push(s3);
7126
+ if (s3 === peg$FAILED) {
7131
7127
  s3 = peg$currPos;
7132
7128
  s4 = peg$parseTagTags();
7133
- if (s4 === peg$FAILED) {
7134
- s4 = null;
7135
- }
7136
- s5 = peg$currPos;
7137
- peg$silentFails++;
7138
- s6 = peg$parseStyledText();
7139
- peg$silentFails--;
7140
- if (s6 === peg$FAILED) {
7141
- s5 = undefined;
7142
- }
7143
- else {
7144
- peg$currPos = s5;
7145
- s5 = peg$FAILED;
7146
- }
7147
- if (s5 !== peg$FAILED) {
7148
- if (input.length > peg$currPos) {
7149
- s6 = input.charAt(peg$currPos);
7150
- peg$currPos++;
7129
+ if (s4 !== peg$FAILED) {
7130
+ s5 = peg$currPos;
7131
+ peg$silentFails++;
7132
+ s6 = peg$parseStyledText();
7133
+ peg$silentFails--;
7134
+ if (s6 === peg$FAILED) {
7135
+ s5 = undefined;
7151
7136
  }
7152
7137
  else {
7153
- s6 = peg$FAILED;
7154
- if (peg$silentFails === 0) {
7155
- peg$fail(peg$e0);
7156
- }
7138
+ peg$currPos = s5;
7139
+ s5 = peg$FAILED;
7157
7140
  }
7158
- if (s6 !== peg$FAILED) {
7159
- s4 = [s4, s5, s6];
7141
+ if (s5 !== peg$FAILED) {
7142
+ s4 = [s4, s5];
7160
7143
  s3 = s4;
7161
7144
  }
7162
7145
  else {
@@ -7169,23 +7152,85 @@ function peg$parse(input, options) {
7169
7152
  s3 = peg$FAILED;
7170
7153
  }
7171
7154
  }
7172
- }
7173
- else {
7174
- s2 = peg$FAILED;
7175
- }
7176
- if (s2 !== peg$FAILED) {
7177
- s1 = input.substring(s1, peg$currPos);
7178
- }
7179
- else {
7180
- s1 = s2;
7181
- }
7182
- if (s1 !== peg$FAILED) {
7183
- peg$savedPos = s0;
7184
- s1 = peg$f80(s1);
7185
- }
7186
- s0 = s1;
7187
- if (s0 === peg$FAILED) {
7188
- s0 = peg$parseNL();
7155
+ if (s3 !== peg$FAILED) {
7156
+ while (s3 !== peg$FAILED) {
7157
+ s2.push(s3);
7158
+ s3 = peg$currPos;
7159
+ s4 = peg$parseTagTags();
7160
+ if (s4 === peg$FAILED) {
7161
+ s4 = null;
7162
+ }
7163
+ s5 = peg$currPos;
7164
+ peg$silentFails++;
7165
+ s6 = peg$parseStyledText();
7166
+ peg$silentFails--;
7167
+ if (s6 === peg$FAILED) {
7168
+ s5 = undefined;
7169
+ }
7170
+ else {
7171
+ peg$currPos = s5;
7172
+ s5 = peg$FAILED;
7173
+ }
7174
+ if (s5 !== peg$FAILED) {
7175
+ s6 = peg$parsechar();
7176
+ if (s6 !== peg$FAILED) {
7177
+ s4 = [s4, s5, s6];
7178
+ s3 = s4;
7179
+ }
7180
+ else {
7181
+ peg$currPos = s3;
7182
+ s3 = peg$FAILED;
7183
+ }
7184
+ }
7185
+ else {
7186
+ peg$currPos = s3;
7187
+ s3 = peg$FAILED;
7188
+ }
7189
+ if (s3 === peg$FAILED) {
7190
+ s3 = peg$currPos;
7191
+ s4 = peg$parseTagTags();
7192
+ if (s4 !== peg$FAILED) {
7193
+ s5 = peg$currPos;
7194
+ peg$silentFails++;
7195
+ s6 = peg$parseStyledText();
7196
+ peg$silentFails--;
7197
+ if (s6 === peg$FAILED) {
7198
+ s5 = undefined;
7199
+ }
7200
+ else {
7201
+ peg$currPos = s5;
7202
+ s5 = peg$FAILED;
7203
+ }
7204
+ if (s5 !== peg$FAILED) {
7205
+ s4 = [s4, s5];
7206
+ s3 = s4;
7207
+ }
7208
+ else {
7209
+ peg$currPos = s3;
7210
+ s3 = peg$FAILED;
7211
+ }
7212
+ }
7213
+ else {
7214
+ peg$currPos = s3;
7215
+ s3 = peg$FAILED;
7216
+ }
7217
+ }
7218
+ }
7219
+ }
7220
+ else {
7221
+ s2 = peg$FAILED;
7222
+ }
7223
+ if (s2 !== peg$FAILED) {
7224
+ s1 = input.substring(s1, peg$currPos);
7225
+ }
7226
+ else {
7227
+ s1 = s2;
7228
+ }
7229
+ if (s1 !== peg$FAILED) {
7230
+ peg$savedPos = s0;
7231
+ s1 = peg$f81(s1);
7232
+ }
7233
+ s0 = s1;
7189
7234
  }
7190
7235
  return s0;
7191
7236
  }
@@ -7402,7 +7447,7 @@ function peg$parse(input, options) {
7402
7447
  s3 = peg$parseBodyBitCloseTag();
7403
7448
  if (s3 !== peg$FAILED) {
7404
7449
  peg$savedPos = s0;
7405
- s0 = peg$f81(s2);
7450
+ s0 = peg$f82(s2);
7406
7451
  }
7407
7452
  else {
7408
7453
  peg$currPos = s0;
@@ -7573,7 +7618,7 @@ function peg$parse(input, options) {
7573
7618
  s5 = peg$parseBoldTag();
7574
7619
  if (s5 !== peg$FAILED) {
7575
7620
  peg$savedPos = s0;
7576
- s0 = peg$f82(s3);
7621
+ s0 = peg$f83(s3);
7577
7622
  }
7578
7623
  else {
7579
7624
  peg$currPos = s0;
@@ -7739,7 +7784,7 @@ function peg$parse(input, options) {
7739
7784
  s5 = peg$parseItalicTag();
7740
7785
  if (s5 !== peg$FAILED) {
7741
7786
  peg$savedPos = s0;
7742
- s0 = peg$f83(s3);
7787
+ s0 = peg$f84(s3);
7743
7788
  }
7744
7789
  else {
7745
7790
  peg$currPos = s0;
@@ -7905,7 +7950,7 @@ function peg$parse(input, options) {
7905
7950
  s5 = peg$parseLightTag();
7906
7951
  if (s5 !== peg$FAILED) {
7907
7952
  peg$savedPos = s0;
7908
- s0 = peg$f84(s3);
7953
+ s0 = peg$f85(s3);
7909
7954
  }
7910
7955
  else {
7911
7956
  peg$currPos = s0;
@@ -8071,7 +8116,7 @@ function peg$parse(input, options) {
8071
8116
  s5 = peg$parseHighlightTag();
8072
8117
  if (s5 !== peg$FAILED) {
8073
8118
  peg$savedPos = s0;
8074
- s0 = peg$f85(s3);
8119
+ s0 = peg$f86(s3);
8075
8120
  }
8076
8121
  else {
8077
8122
  peg$currPos = s0;
@@ -8092,14 +8137,14 @@ function peg$parse(input, options) {
8092
8137
  var s0, s1, s2, s3, s4;
8093
8138
  s0 = peg$currPos;
8094
8139
  s1 = peg$currPos;
8095
- s2 = peg$parseBoldTag();
8140
+ s2 = peg$parseLightTag();
8096
8141
  if (s2 !== peg$FAILED) {
8097
8142
  s3 = [];
8098
- s4 = peg$parseBoldHalfTag();
8143
+ s4 = peg$parseLightHalfTag();
8099
8144
  if (s4 !== peg$FAILED) {
8100
8145
  while (s4 !== peg$FAILED) {
8101
8146
  s3.push(s4);
8102
- s4 = peg$parseBoldHalfTag();
8147
+ s4 = peg$parseLightHalfTag();
8103
8148
  }
8104
8149
  }
8105
8150
  else {
@@ -8127,14 +8172,14 @@ function peg$parse(input, options) {
8127
8172
  if (s0 === peg$FAILED) {
8128
8173
  s0 = peg$currPos;
8129
8174
  s1 = peg$currPos;
8130
- s2 = peg$parseItalicTag();
8175
+ s2 = peg$parseHighlightTag();
8131
8176
  if (s2 !== peg$FAILED) {
8132
8177
  s3 = [];
8133
- s4 = peg$parseItalicHalfTag();
8178
+ s4 = peg$parseHighlightHalfTag();
8134
8179
  if (s4 !== peg$FAILED) {
8135
8180
  while (s4 !== peg$FAILED) {
8136
8181
  s3.push(s4);
8137
- s4 = peg$parseItalicHalfTag();
8182
+ s4 = peg$parseHighlightHalfTag();
8138
8183
  }
8139
8184
  }
8140
8185
  else {
@@ -8159,78 +8204,6 @@ function peg$parse(input, options) {
8159
8204
  else {
8160
8205
  s0 = s1;
8161
8206
  }
8162
- if (s0 === peg$FAILED) {
8163
- s0 = peg$currPos;
8164
- s1 = peg$currPos;
8165
- s2 = peg$parseLightTag();
8166
- if (s2 !== peg$FAILED) {
8167
- s3 = [];
8168
- s4 = peg$parseLightHalfTag();
8169
- if (s4 !== peg$FAILED) {
8170
- while (s4 !== peg$FAILED) {
8171
- s3.push(s4);
8172
- s4 = peg$parseLightHalfTag();
8173
- }
8174
- }
8175
- else {
8176
- s3 = peg$FAILED;
8177
- }
8178
- if (s3 !== peg$FAILED) {
8179
- s2 = [s2, s3];
8180
- s1 = s2;
8181
- }
8182
- else {
8183
- peg$currPos = s1;
8184
- s1 = peg$FAILED;
8185
- }
8186
- }
8187
- else {
8188
- peg$currPos = s1;
8189
- s1 = peg$FAILED;
8190
- }
8191
- if (s1 !== peg$FAILED) {
8192
- s0 = input.substring(s0, peg$currPos);
8193
- }
8194
- else {
8195
- s0 = s1;
8196
- }
8197
- if (s0 === peg$FAILED) {
8198
- s0 = peg$currPos;
8199
- s1 = peg$currPos;
8200
- s2 = peg$parseHighlightTag();
8201
- if (s2 !== peg$FAILED) {
8202
- s3 = [];
8203
- s4 = peg$parseHighlightHalfTag();
8204
- if (s4 !== peg$FAILED) {
8205
- while (s4 !== peg$FAILED) {
8206
- s3.push(s4);
8207
- s4 = peg$parseHighlightHalfTag();
8208
- }
8209
- }
8210
- else {
8211
- s3 = peg$FAILED;
8212
- }
8213
- if (s3 !== peg$FAILED) {
8214
- s2 = [s2, s3];
8215
- s1 = s2;
8216
- }
8217
- else {
8218
- peg$currPos = s1;
8219
- s1 = peg$FAILED;
8220
- }
8221
- }
8222
- else {
8223
- peg$currPos = s1;
8224
- s1 = peg$FAILED;
8225
- }
8226
- if (s1 !== peg$FAILED) {
8227
- s0 = input.substring(s0, peg$currPos);
8228
- }
8229
- else {
8230
- s0 = s1;
8231
- }
8232
- }
8233
- }
8234
8207
  }
8235
8208
  return s0;
8236
8209
  }
@@ -8703,7 +8676,7 @@ function peg$parse(input, options) {
8703
8676
  }
8704
8677
  s2 = input.substring(s2, peg$currPos);
8705
8678
  peg$savedPos = s0;
8706
- s0 = peg$f86(s1, s2);
8679
+ s0 = peg$f87(s1, s2);
8707
8680
  }
8708
8681
  else {
8709
8682
  peg$currPos = s0;