@gmb/bitmark-parser-generator 1.34.0 → 2.0.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 (317) 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/BitmarkParserGenerator.js +8 -3
  4. package/dist/cjs/BitmarkParserGenerator.js.map +1 -1
  5. package/dist/cjs/ast/Ast.js +1 -0
  6. package/dist/cjs/ast/Ast.js.map +1 -1
  7. package/dist/cjs/ast/BaseBuilder.js +91 -54
  8. package/dist/cjs/ast/BaseBuilder.js.map +1 -1
  9. package/dist/cjs/ast/Builder.js +780 -377
  10. package/dist/cjs/ast/Builder.js.map +1 -1
  11. package/dist/cjs/ast/ResourceBuilder.js +516 -252
  12. package/dist/cjs/ast/ResourceBuilder.js.map +1 -1
  13. package/dist/cjs/ast/rules/NodeValidator.js +61 -22
  14. package/dist/cjs/ast/rules/NodeValidator.js.map +1 -1
  15. package/dist/cjs/ast/writer/StreamWriter.js +13 -0
  16. package/dist/cjs/ast/writer/StreamWriter.js.map +1 -1
  17. package/dist/cjs/ast/writer/StringWriter.js +13 -0
  18. package/dist/cjs/ast/writer/StringWriter.js.map +1 -1
  19. package/dist/cjs/breakscaping/Breakscape.js +122 -95
  20. package/dist/cjs/breakscaping/Breakscape.js.map +1 -1
  21. package/dist/cjs/config/raw/bits.js +24 -5
  22. package/dist/cjs/config/raw/bits.js.map +1 -1
  23. package/dist/cjs/config/raw/properties.js +7 -2
  24. package/dist/cjs/config/raw/properties.js.map +1 -1
  25. package/dist/cjs/generated/build-info.js +1 -1
  26. package/dist/cjs/generated/build-info.js.map +1 -1
  27. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js +312 -262
  28. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js.map +1 -1
  29. package/dist/cjs/generator/AstWalkerGenerator.js +4 -1
  30. package/dist/cjs/generator/AstWalkerGenerator.js.map +1 -1
  31. package/dist/cjs/generator/bitmark/BitmarkGenerator.js +977 -336
  32. package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -1
  33. package/dist/cjs/generator/json/JsonGenerator.js +361 -1964
  34. package/dist/cjs/generator/json/JsonGenerator.js.map +1 -1
  35. package/dist/cjs/generator/text/TextGenerator.js +26 -8
  36. package/dist/cjs/generator/text/TextGenerator.js.map +1 -1
  37. package/dist/cjs/index.js.map +1 -1
  38. package/dist/cjs/model/ast/NodeType.js +64 -42
  39. package/dist/cjs/model/ast/NodeType.js.map +1 -1
  40. package/dist/cjs/model/config/enum/PropertyConfigKey.js +1 -0
  41. package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +1 -1
  42. package/dist/cjs/model/enum/BitType.js +2 -2
  43. package/dist/cjs/model/enum/BitType.js.map +1 -1
  44. package/dist/cjs/model/enum/PropertyFormat.js +3 -1
  45. package/dist/cjs/model/enum/PropertyFormat.js.map +1 -1
  46. package/dist/cjs/model/enum/TextFormat.js +1 -0
  47. package/dist/cjs/model/enum/TextFormat.js.map +1 -1
  48. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +22 -4
  49. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -1
  50. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +93 -88
  51. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
  52. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js +3 -1
  53. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -1
  54. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js +10 -32
  55. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -1
  56. package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +255 -0
  57. package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +1 -0
  58. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +2 -1
  59. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
  60. package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +175 -129
  61. package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -1
  62. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +8 -2
  63. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
  64. package/dist/cjs/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js +61 -0
  65. package/dist/cjs/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js.map +1 -0
  66. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +11 -5
  67. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
  68. package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +21 -17
  69. package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
  70. package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +50 -0
  71. package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +1 -0
  72. package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +2 -15
  73. package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +1 -1
  74. package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +2 -4
  75. package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +1 -1
  76. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +4 -1
  77. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
  78. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +2 -4
  79. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +1 -1
  80. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +5 -5
  81. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +1 -1
  82. package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +5 -6
  83. package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +1 -1
  84. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +23 -7
  85. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
  86. package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +5 -5
  87. package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +1 -1
  88. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +3 -2
  89. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -1
  90. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +19 -8
  91. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
  92. package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +4 -6
  93. package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +1 -1
  94. package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +4 -5
  95. package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +1 -1
  96. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +14 -5
  97. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
  98. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +37 -21
  99. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +1 -1
  100. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +3 -2
  101. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -1
  102. package/dist/cjs/parser/json/JsonParser.js +73 -759
  103. package/dist/cjs/parser/json/JsonParser.js.map +1 -1
  104. package/dist/cjs/parser/text/TextParser.js +75 -1
  105. package/dist/cjs/parser/text/TextParser.js.map +1 -1
  106. package/dist/cjs/utils/BitUtils.js +15 -13
  107. package/dist/cjs/utils/BitUtils.js.map +1 -1
  108. package/dist/cjs/utils/StringUtils.js +40 -0
  109. package/dist/cjs/utils/StringUtils.js.map +1 -1
  110. package/dist/esm/BitmarkParserGenerator.js +8 -3
  111. package/dist/esm/BitmarkParserGenerator.js.map +1 -1
  112. package/dist/esm/ast/Ast.js +1 -0
  113. package/dist/esm/ast/Ast.js.map +1 -1
  114. package/dist/esm/ast/BaseBuilder.js +91 -54
  115. package/dist/esm/ast/BaseBuilder.js.map +1 -1
  116. package/dist/esm/ast/Builder.js +780 -377
  117. package/dist/esm/ast/Builder.js.map +1 -1
  118. package/dist/esm/ast/ResourceBuilder.js +516 -252
  119. package/dist/esm/ast/ResourceBuilder.js.map +1 -1
  120. package/dist/esm/ast/rules/NodeValidator.js +61 -22
  121. package/dist/esm/ast/rules/NodeValidator.js.map +1 -1
  122. package/dist/esm/ast/writer/StreamWriter.js +13 -0
  123. package/dist/esm/ast/writer/StreamWriter.js.map +1 -1
  124. package/dist/esm/ast/writer/StringWriter.js +13 -0
  125. package/dist/esm/ast/writer/StringWriter.js.map +1 -1
  126. package/dist/esm/breakscaping/Breakscape.js +122 -95
  127. package/dist/esm/breakscaping/Breakscape.js.map +1 -1
  128. package/dist/esm/config/raw/bits.js +24 -5
  129. package/dist/esm/config/raw/bits.js.map +1 -1
  130. package/dist/esm/config/raw/properties.js +7 -2
  131. package/dist/esm/config/raw/properties.js.map +1 -1
  132. package/dist/esm/generated/build-info.js +1 -1
  133. package/dist/esm/generated/build-info.js.map +1 -1
  134. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js +312 -262
  135. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js.map +1 -1
  136. package/dist/esm/generator/AstWalkerGenerator.js +4 -1
  137. package/dist/esm/generator/AstWalkerGenerator.js.map +1 -1
  138. package/dist/esm/generator/bitmark/BitmarkGenerator.js +977 -336
  139. package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -1
  140. package/dist/esm/generator/json/JsonGenerator.js +361 -1964
  141. package/dist/esm/generator/json/JsonGenerator.js.map +1 -1
  142. package/dist/esm/generator/text/TextGenerator.js +26 -8
  143. package/dist/esm/generator/text/TextGenerator.js.map +1 -1
  144. package/dist/esm/index.js.map +1 -1
  145. package/dist/esm/model/ast/NodeType.js +64 -42
  146. package/dist/esm/model/ast/NodeType.js.map +1 -1
  147. package/dist/esm/model/config/enum/PropertyConfigKey.js +1 -0
  148. package/dist/esm/model/config/enum/PropertyConfigKey.js.map +1 -1
  149. package/dist/esm/model/enum/BitType.js +2 -2
  150. package/dist/esm/model/enum/BitType.js.map +1 -1
  151. package/dist/esm/model/enum/PropertyFormat.js +3 -1
  152. package/dist/esm/model/enum/PropertyFormat.js.map +1 -1
  153. package/dist/esm/model/enum/TextFormat.js +1 -0
  154. package/dist/esm/model/enum/TextFormat.js.map +1 -1
  155. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +22 -4
  156. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -1
  157. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +93 -88
  158. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
  159. package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js +3 -1
  160. package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -1
  161. package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js +10 -32
  162. package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -1
  163. package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +252 -0
  164. package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +1 -0
  165. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +2 -1
  166. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
  167. package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +175 -129
  168. package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -1
  169. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +8 -2
  170. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
  171. package/dist/esm/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js +58 -0
  172. package/dist/esm/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js.map +1 -0
  173. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +11 -5
  174. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
  175. package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +21 -17
  176. package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
  177. package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +47 -0
  178. package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +1 -0
  179. package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +2 -15
  180. package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +1 -1
  181. package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +2 -4
  182. package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +1 -1
  183. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +4 -1
  184. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
  185. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +2 -4
  186. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +1 -1
  187. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +5 -5
  188. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +1 -1
  189. package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +5 -6
  190. package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +1 -1
  191. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +23 -7
  192. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
  193. package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +5 -5
  194. package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +1 -1
  195. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +3 -2
  196. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -1
  197. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +19 -8
  198. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
  199. package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +4 -6
  200. package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +1 -1
  201. package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +4 -5
  202. package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +1 -1
  203. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +14 -5
  204. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
  205. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +37 -21
  206. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +1 -1
  207. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +3 -2
  208. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -1
  209. package/dist/esm/parser/json/JsonParser.js +73 -759
  210. package/dist/esm/parser/json/JsonParser.js.map +1 -1
  211. package/dist/esm/parser/text/TextParser.js +75 -1
  212. package/dist/esm/parser/text/TextParser.js.map +1 -1
  213. package/dist/esm/utils/BitUtils.js +15 -13
  214. package/dist/esm/utils/BitUtils.js.map +1 -1
  215. package/dist/esm/utils/StringUtils.js +40 -0
  216. package/dist/esm/utils/StringUtils.js.map +1 -1
  217. package/dist/types/BitmarkParserGenerator.d.ts +8 -0
  218. package/dist/types/BitmarkParserGenerator.d.ts.map +1 -1
  219. package/dist/types/ast/Ast.d.ts.map +1 -1
  220. package/dist/types/ast/BaseBuilder.d.ts +31 -21
  221. package/dist/types/ast/BaseBuilder.d.ts.map +1 -1
  222. package/dist/types/ast/Builder.d.ts +283 -435
  223. package/dist/types/ast/Builder.d.ts.map +1 -1
  224. package/dist/types/ast/ResourceBuilder.d.ts +177 -164
  225. package/dist/types/ast/ResourceBuilder.d.ts.map +1 -1
  226. package/dist/types/ast/rules/NodeValidator.d.ts +3 -2
  227. package/dist/types/ast/rules/NodeValidator.d.ts.map +1 -1
  228. package/dist/types/ast/writer/StreamWriter.d.ts +2 -0
  229. package/dist/types/ast/writer/StreamWriter.d.ts.map +1 -1
  230. package/dist/types/ast/writer/StringWriter.d.ts +2 -0
  231. package/dist/types/ast/writer/StringWriter.d.ts.map +1 -1
  232. package/dist/types/ast/writer/Writer.d.ts +6 -0
  233. package/dist/types/ast/writer/Writer.d.ts.map +1 -1
  234. package/dist/types/breakscaping/Breakscape.d.ts +6 -1
  235. package/dist/types/breakscaping/Breakscape.d.ts.map +1 -1
  236. package/dist/types/config/raw/bits.d.ts.map +1 -1
  237. package/dist/types/config/raw/properties.d.ts.map +1 -1
  238. package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts.map +1 -1
  239. package/dist/types/generator/AstWalkerGenerator.d.ts.map +1 -1
  240. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +91 -55
  241. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +1 -1
  242. package/dist/types/generator/json/JsonGenerator.d.ts +96 -108
  243. package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -1
  244. package/dist/types/generator/text/TextGenerator.d.ts +14 -2
  245. package/dist/types/generator/text/TextGenerator.d.ts.map +1 -1
  246. package/dist/types/index.d.ts +2 -2
  247. package/dist/types/index.d.ts.map +1 -1
  248. package/dist/types/model/ast/NodeType.d.ts +122 -84
  249. package/dist/types/model/ast/NodeType.d.ts.map +1 -1
  250. package/dist/types/model/ast/Nodes.d.ts +66 -436
  251. package/dist/types/model/ast/Nodes.d.ts.map +1 -1
  252. package/dist/types/model/ast/TextNodes.d.ts +1 -1
  253. package/dist/types/model/ast/TextNodes.d.ts.map +1 -1
  254. package/dist/types/model/config/enum/ConfigKey.d.ts +2 -0
  255. package/dist/types/model/config/enum/ConfigKey.d.ts.map +1 -1
  256. package/dist/types/model/config/enum/PropertyConfigKey.d.ts +3 -0
  257. package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +1 -1
  258. package/dist/types/model/enum/BitType.d.ts +4 -4
  259. package/dist/types/model/enum/PropertyFormat.d.ts +4 -2
  260. package/dist/types/model/enum/PropertyFormat.d.ts.map +1 -1
  261. package/dist/types/model/enum/PropertyTag.d.ts +2 -0
  262. package/dist/types/model/enum/PropertyTag.d.ts.map +1 -1
  263. package/dist/types/model/enum/TextFormat.d.ts +2 -0
  264. package/dist/types/model/enum/TextFormat.d.ts.map +1 -1
  265. package/dist/types/model/json/BitJson.d.ts +32 -20
  266. package/dist/types/model/json/BitJson.d.ts.map +1 -1
  267. package/dist/types/model/json/BodyBitJson.d.ts +16 -12
  268. package/dist/types/model/json/BodyBitJson.d.ts.map +1 -1
  269. package/dist/types/model/json/ResourceJson.d.ts +2 -22
  270. package/dist/types/model/json/ResourceJson.d.ts.map +1 -1
  271. package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts +4 -2
  272. package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts.map +1 -1
  273. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +3 -9
  274. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -1
  275. package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +90 -74
  276. package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +1 -1
  277. package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts +2 -2
  278. package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +1 -1
  279. package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts +37 -0
  280. package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts.map +1 -0
  281. package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts.map +1 -1
  282. package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts +2 -2
  283. package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts.map +1 -1
  284. package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts.map +1 -1
  285. package/dist/types/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.d.ts +15 -0
  286. package/dist/types/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.d.ts.map +1 -0
  287. package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts.map +1 -1
  288. package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts.map +1 -1
  289. package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts +16 -0
  290. package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts.map +1 -0
  291. package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts.map +1 -1
  292. package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts.map +1 -1
  293. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +1 -1
  294. package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts.map +1 -1
  295. package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts.map +1 -1
  296. package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts.map +1 -1
  297. package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +1 -1
  298. package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts.map +1 -1
  299. package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts.map +1 -1
  300. package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +2 -2
  301. package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +1 -1
  302. package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts.map +1 -1
  303. package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts.map +1 -1
  304. package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts +5 -2
  305. package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +1 -1
  306. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts +1 -1
  307. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts.map +1 -1
  308. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts.map +1 -1
  309. package/dist/types/parser/json/JsonParser.d.ts +9 -72
  310. package/dist/types/parser/json/JsonParser.d.ts.map +1 -1
  311. package/dist/types/parser/text/TextParser.d.ts +16 -1
  312. package/dist/types/parser/text/TextParser.d.ts.map +1 -1
  313. package/dist/types/utils/BitUtils.d.ts +8 -8
  314. package/dist/types/utils/BitUtils.d.ts.map +1 -1
  315. package/dist/types/utils/StringUtils.d.ts +24 -0
  316. package/dist/types/utils/StringUtils.d.ts.map +1 -1
  317. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { TextFormat } from '../model/enum/TextFormat';
1
2
  import { StringUtils } from '../utils/StringUtils';
2
3
  /**
3
4
  * Utility class for breakscaping strings.
@@ -9,109 +10,114 @@ import { StringUtils } from '../utils/StringUtils';
9
10
  * being broken (split) by a special charater.
10
11
  *
11
12
  * The special character is ^
12
- * To include the special character in a text where it breakscapes, use ^^ (once), ^^^ (twice), etc.
13
+ * To include the special character in a text which is breakscaped, use ^^ (once), ^^^ (twice), etc.
13
14
  *
14
- * The following sequences can be breakscaped:
15
- * - inline: == ==> =^=
16
- * - title block: (SOL)[##]#(space) ==> (SOL)[##]#^(space)
17
- * - new block: (SOL)|(WS EOL) ==> (SOL)|^(WS EOL)
18
- * - code block: (SOL)|code(:type) ==> (SOL)|^code(:type)
19
- * - image block: (SOL)|image:(url) ==> (SOL)|^image:(url)
20
- * - bullet list: (SOL)•(space) ==> (SOL)•^(space)
21
- * - ordered list: (SOL)•1(space) ==> (SOL)•^1(space)
22
- * - tag list +: (SOL)•+(space) ==> (SOL)•^+(space)
23
- * - tag list -: (SOL)•-(space) ==> (SOL)•^-(space)
24
- * - bold: ** ==> *^*
25
- * - light: `` ==> `^`
26
- * - italic: __ ==> _^_
27
- * - highlight: !! ==> !^!
28
- * - start of bit: [. ==> [^.
29
- * - start of property: [@ ==> [^@
30
- * - start of title: [# ==> [^#
31
- * - start of anchor: [▼ ==> [^▼
32
- * - start of reference: [► ==> [^►
33
- * - start of item/lead: [% ==> [^%
34
- * - start of instruction: [! ==> [^!
35
- * - start of hint: [? ==> [^?
36
- * - start of true statement: [+ ==> [^+
37
- * - start of false statement: [- ==> [^-
38
- * - start of sample solution: [$ ==> [^$
39
- * - start of gap: [_ ==> [^_
40
- * - start of mark: [= ==> [^=
41
- * - start of resource: [& ==> [^&
42
- * - end of tag: ] ==> ^]
15
+ * Any sequence can be breakscaped by breaking it with a ^ character.
43
16
  *
17
+ * The following unbreakscaping rules are applied when unbreakscaping text:
18
+ * - hat: ^ ==>
19
+ * - hat: ^^ ==> ^
20
+ * - hat: ^..N ==> ^..N-1
44
21
  *
45
- * The following are breakscaped with ^ in between. Just add more ^s to increase the number of ^ string:
46
- * - inline / card set start: =^= ==> =^^=
47
- * - footer: ~^~ ==> ~^^~
48
- * - title block: (SOL)[##]#^(space) ==> (SOL)[##]#^^(space)
49
- * - new block: (SOL)|^(WS EOL) ==> (SOL)|^^(WS EOL)
50
- * - code block: (SOL)|^code(:type) ==> (SOL)|^^code(:type)
51
- * - image block: (SOL)|^image:(url) ==> (SOL)|^^image:(url)
52
- * - bullet list: (SOL)•^(space) ==> (SOL)•^^(space)
53
- * - ordered list: (SOL)•^1(space) ==> (SOL)•^^1(space)
54
- * - tag list +: (SOL)•^+(space) ==> (SOL)•^^+(space)
55
- * - tag list -: (SOL)•^-(space) ==> (SOL)•^^-(space)
56
- * - bold: *^* ==> *^^*
57
- * - light: `^` ==> `^^`
58
- * - italic: _^_ ==> _^^_
59
- * - highlight: !^! ==> !^^!
60
- * - start of bit: [^. ==> [^^.
61
- * - start of property: [^@ ==> [^^@
62
- * - start of title: [^# ==> [^^#
63
- * - start of anchor: [^▼ ==> [^^▼
64
- * - start of reference: [^► ==> [^^►
65
- * - start of item/lead: [^% ==> [^^%
66
- * - start of instruction: [^! ==> [^^!
67
- * - start of hint: [^? ==> [^^?
68
- * - start of true statement: [^+ ==> [^^+
69
- * - start of false statement: [^- ==> [^^-
70
- * - start of sample solution: [^$ ==> [^^$
71
- * - start of gap: [^_ ==> [^^_
72
- * - start of mark: [^= ==> [^^=
73
- * - start of resource: [^& ==> [^^&
74
- * - end of tag: ^] ==> ^^]
22
+ * The following breakscaping rules are applied when breakscaping text:
23
+ * - hat: ^ ==> ^^ [bitmark-- / bitmark++]
24
+ * - hat: ^^ ==> ^^^ [bitmark-- / bitmark++]
25
+ * - hat: ^..N ==> ^..N+1 [bitmark-- / bitmark++]
26
+ * - inline: == ==> =^= [bitmark++]
27
+ * - title block: (SOL)[##]#(space) ==> (SOL)[##]#^(space) [bitmark++]
28
+ * - new block: (SOL)|(WS EOL) ==> (SOL)|^(WS EOL) [bitmark++]
29
+ * - code block: (SOL)|code(:type) ==> (SOL)|^code(:type) [bitmark++]
30
+ * - image block: (SOL)|image:(url) ==> (SOL)|^image:(url) [bitmark++]
31
+ * - bullet list: (SOL)(space) ==> (SOL)•^(space) [bitmark++]
32
+ * - simple list: (SOL)•_(space) ==> (SOL)•^_(space) [bitmark++]
33
+ * - ordered list (numeric): (SOL)•<numbers>(space) ==> (SOL)•^<numbers>(space) [bitmark++]
34
+ * - ordered list: (roman,lower) (SOL)•<numbers>i(space) ==> (SOL)•^<numbers>i(space) [bitmark++]
35
+ * - ordered list: (roman,upper) (SOL)•<numbers>I(space) ==> (SOL)•^<numbers>I(space) [bitmark++]
36
+ * - ordered list: (SOL)•<letters>(space) ==> (SOL)•^<letters>(space) [bitmark++]
37
+ * - tag list +: (SOL)•+(space) ==> (SOL)•^+(space) [bitmark++]
38
+ * - tag list -: (SOL)•-(space) ==> (SOL)•^-(space) [bitmark++]
39
+ * - bold: ** ==> *^* [bitmark-- / bitmark++]
40
+ * - half-bold (at end): *<end> ==> *^<end> [bitmark-- / bitmark++]
41
+ * - half-bold (at start): <start>* ==> <start>^* [bitmark-- / bitmark++]
42
+ * - light: `` ==> `^` [bitmark-- / bitmark++]
43
+ * - half-light (at end): `<end> ==> `^<end> [bitmark-- / bitmark++]
44
+ * - half-light (at start): <start>` ==> <start>^` [bitmark-- / bitmark++]
45
+ * - italic: __ ==> _^_ [bitmark-- / bitmark++]
46
+ * - half-italic (at end): _<end> ==> _^<end> [bitmark-- / bitmark++]
47
+ * - half-italic (at start): <start>_ ==> <start>^_ [bitmark-- / bitmark++]
48
+ * - highlight: !! ==> !^! [bitmark-- / bitmark++]
49
+ * - half-highlight (at end): !<end> ==> !^<end> [bitmark-- / bitmark++]
50
+ * - half-highlight (at start): <start>! ==> <start>^! [bitmark-- / bitmark++]
51
+ * - start of bit (at end): [<end> ==> [^<end> [bitmark-- / bitmark++]
52
+ * - start of bit: [. ==> [^. [bitmark-- / bitmark++]
53
+ * - start of property: [@ ==> [^@ [bitmark-- / bitmark++]
54
+ * - start of title: [# ==> [^# [bitmark-- / bitmark++]
55
+ * - start of anchor: [▼ ==> [^▼ [bitmark-- / bitmark++]
56
+ * - start of reference: [► ==> [^► [bitmark-- / bitmark++]
57
+ * - start of item/lead: [% ==> [^% [bitmark-- / bitmark++]
58
+ * - start of instruction: [! ==> [^! [bitmark-- / bitmark++]
59
+ * - start of hint: [? ==> [^? [bitmark-- / bitmark++]
60
+ * - start of true statement: [+ ==> [^+ [bitmark-- / bitmark++]
61
+ * - start of false statement: [- ==> [^- [bitmark-- / bitmark++]
62
+ * - start of sample solution: [$ ==> [^$ [bitmark-- / bitmark++]
63
+ * - start of gap: [_ ==> [^_ [bitmark-- / bitmark++]
64
+ * - start of mark: [= ==> [^= [bitmark-- / bitmark++]
65
+ * - start of resource: [& ==> [^& [bitmark-- / bitmark++]
66
+ * - end of tag: ] ==> ^] [bitmark-- / bitmark++]
67
+ *
68
+ * In non- bitmark++ / bitmark-- text, breakscaping is only applied to bit tags.
69
+ * This is true for both breakscaping and unbreakscaping.
70
+ *
71
+ * The following unbreakscaping rules are applied when unbreakscaping plain text:
72
+ * - start of bit: <line start>[^. ==> <line start>[.
73
+ * - start of bit: <line start>[^^. ==> <line start>[^.
74
+ * - start of bit: <line start>[^..N. ==> <line start>[^..N-1.
75
+ *
76
+ * The following breakscaping rules are applied when breakscaping plain text:
77
+ * - start of bit: <line start>[. ==> <line start>[^.
78
+ * - start of bit: <line start>[^. ==> <line start>[^^.
79
+ * - start of bit: <line start>[^..N. ==> <line start>[^..N+1.
75
80
  */
76
81
  //
77
82
  // Breakscaping
78
83
  //
79
- const REGEX_MARKS = /([*`_!=~])([\^]*)\1/;
80
- const REGEX_BLOCKS = /^(\|)([\^]*)(code[\s]*|code:|image:|[\s]*$)/;
81
- const REGEX_TITLE_BLOCKS = /^([#]{1,3})([\^]*)([^\S\r\n]+)/;
82
- const REGEX_LIST_BLOCKS = /^(•)([\^]*)(1|\+|-|)([^\S\r\n]+)/;
83
- const REGEX_START_OF_TAG = /(\[)([\^]*)([.@#▼►%!?+\-$_=&])/;
84
- const REGEX_END_OF_TAG = /([\^]*)(])/;
85
- const BREAKSCAPE_REGEX_SOURCE = `${REGEX_MARKS.source}|${REGEX_BLOCKS.source}|${REGEX_TITLE_BLOCKS.source}|${REGEX_LIST_BLOCKS.source}|${REGEX_START_OF_TAG.source}|${REGEX_END_OF_TAG.source}`;
86
- const UNBREAKSCAPE_REGEX_SOURCE = BREAKSCAPE_REGEX_SOURCE.replace(/(\(\[\\\^\]\*\))/g, '\\^$1'); // Add ^ into the regex
87
- // Regex groups in BODY (bitmark++):
88
- // 1: start of MARK
89
- // 2: ^ in MARK
90
- // 3: start of BLOCK
91
- // 4: ^ in BLOCK
92
- // 5: end of BLOCK
93
- // 6: start of TITLE_BLOCK
94
- // 7: ^ in TITLE_BLOCK
95
- // 8: end of TITLE_BLOCK
96
- // 9: start of LIST_BLOCK
97
- // 10: ^ in LIST_BLOCK
98
- // 11: end of LIST_BLOCK part 1
99
- // 12: end of LIST_BLOCK part 2
100
- // 13: start of START_OF_TAG block
101
- // 14: ^ in START_OF_TAG block
102
- // 15: end of START_OF_TAG block
103
- // 16: ^ in END_OF_TAG block
104
- // 17: end of END_OF_TAG block
105
- const BREAKSCAPE_REGEX = new RegExp(BREAKSCAPE_REGEX_SOURCE, 'gm');
106
- const BREAKSCAPE_REGEX_REPLACER = '$1$3$6$9$13^$2$1$4$5$7$8$10$11$12$14$15$16$17';
107
- const UNBREAKSCAPE_REGEX = new RegExp(UNBREAKSCAPE_REGEX_SOURCE, 'gm');
108
- const UNBREAKSCAPE_REGEX_REPLACER = BREAKSCAPE_REGEX_REPLACER.replace(/\^/g, ''); // Remove ^ from the regex replacer
84
+ const REGEX_MARKS = /([*`_!=])(?=\1)/; // $1^
85
+ const REGEX_BLOCKS = /^(\|)(code[\s]*|code:|image:|[\s]*$)/; // $2^$3
86
+ const REGEX_TITLE_BLOCKS = /^([#]{1,3})([^\S\r\n]+)/; // $4^$5
87
+ const REGEX_LIST_BLOCKS = /^(•)([0-9]+[iI]*|[a-zA-Z]{1}|_|\+|-|)([^\S\r\n]+)/; // $6^$7$8
88
+ const REGEX_START_OF_TAG = /(\[)([.@#▼►%!?+\-$_=&])/; // $9^$10 / $2^$3
89
+ const REGEX_FOOTER_DIVIDER = /^(~)(~~~)[ \t]*$/; // $11^$12 / $4^$5
90
+ const REGEX_PLAIN_TEXT_DIVIDER = /^(\$)(\$\$\$)[ \t]*$/; // $13^$14 / $6^$7
91
+ const REGEX_END_OF_TAG = /(\^*])/; // ^$15 / ^$8
92
+ const REGEX_HATS = /(\^+)/; // $16^ / ^$9 // Must be last
93
+ const BREAKSCAPE_PLUSPLUS_REGEX_SOURCE = `${REGEX_MARKS.source}|${REGEX_BLOCKS.source}|${REGEX_TITLE_BLOCKS.source}|${REGEX_LIST_BLOCKS.source}|${REGEX_START_OF_TAG.source}|${REGEX_FOOTER_DIVIDER.source}|${REGEX_PLAIN_TEXT_DIVIDER.source}|${REGEX_END_OF_TAG.source}|${REGEX_HATS.source}`;
94
+ const BREAKSCAPE_MINUSMINUS_REGEX_SOURCE = `${REGEX_MARKS.source}|${REGEX_START_OF_TAG.source}|${REGEX_FOOTER_DIVIDER.source}|${REGEX_PLAIN_TEXT_DIVIDER.source}|${REGEX_END_OF_TAG.source}|${REGEX_HATS.source}`;
95
+ const REGEX_START = /^([*`_!=])/; // ^$1
96
+ const REGEX_END = /([*`_!=\\[])$/; // $2^
97
+ const BREAKSCAPE_ENDS_REGEX_SOURCE = `${REGEX_START.source}|${REGEX_END.source}`;
98
+ const BREAKSCAPE_PLUSPLUS_REGEX = new RegExp(BREAKSCAPE_PLUSPLUS_REGEX_SOURCE, 'gm');
99
+ const BREAKSCAPE_PLUSPLUS_REGEX_REPLACER = '$1$2$4$6$9$11$13$16^$3$5$7$8$10$12$14$15';
100
+ const BREAKSCAPE_MINUSMINUS_REGEX = new RegExp(BREAKSCAPE_MINUSMINUS_REGEX_SOURCE, 'gm');
101
+ const BREAKSCAPE_MINUSMINUS_REGEX_REPLACER = '$1$2$4$6^$3$5$7$8$9';
102
+ const BREAKSCAPE_PLAIN_IN_BODY_REGEX = new RegExp('^(\\[)(\\^*)(\\.)', 'gm');
103
+ const BREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER = '$1^$2$3';
104
+ const BREAKSCAPE_ENDS_REGEX = new RegExp(BREAKSCAPE_ENDS_REGEX_SOURCE, 'g');
105
+ const BREAKSCAPE_ENDS_REGEX_REPLACER = '$2^$1';
106
+ // const UNBREAKSCAPE_REGEX = new RegExp(UNBREAKSCAPE_REGEX_SOURCE, 'gm');
107
+ // const UNBREAKSCAPE_REGEX_REPLACER = BREAKSCAPE_REGEX_REPLACER.replace(/\^/g, ''); // Remove ^ from the regex replacer
108
+ const UNBREAKSCAPE_REGEX = new RegExp('\\^([\\^]*)', 'gm');
109
+ const UNBREAKSCAPE_REGEX_REPLACER = '$1';
110
+ const UNBREAKSCAPE_PLAIN_IN_BODY_REGEX = new RegExp('^(\\[)\\^(\\^*)(\\.)', 'gm');
111
+ const UNBREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER = '$1$2$3';
109
112
  // Regex explanation:
110
113
  // - match a single | or • or # character at the start of a line and capture in group 1
111
114
  // This will capture all new block characters within the code text.
112
115
  // Replace with group 1, ^
113
116
  const BREAKSCAPE_CODE_REGEX = new RegExp('^(\\||•|#)', 'gm');
114
117
  const BREAKSCAPE_CODE_REGEX_REPLACER = '$1^';
118
+ const DEFAULT_BREAKSCAPE_OPTIONS = {
119
+ textFormat: TextFormat.bitmarkMinusMinus,
120
+ };
115
121
  class Breakscape {
116
122
  constructor() {
117
123
  this.EMPTY_STRING = '';
@@ -128,11 +134,26 @@ class Breakscape {
128
134
  breakscape(val, options) {
129
135
  if (val == null)
130
136
  return val;
131
- const opts = Object.assign({}, options);
137
+ const opts = Object.assign({}, DEFAULT_BREAKSCAPE_OPTIONS, options);
132
138
  const breakscapeStr = (str) => {
133
139
  if (!str)
134
140
  return str;
135
- str = str.replace(BREAKSCAPE_REGEX, BREAKSCAPE_REGEX_REPLACER);
141
+ let regex = BREAKSCAPE_PLAIN_IN_BODY_REGEX;
142
+ let replacer = BREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER;
143
+ if (opts.textFormat === TextFormat.bitmarkMinusMinus) {
144
+ regex = BREAKSCAPE_MINUSMINUS_REGEX;
145
+ replacer = BREAKSCAPE_MINUSMINUS_REGEX_REPLACER;
146
+ }
147
+ else if (opts.textFormat === TextFormat.bitmarkPlusPlus) {
148
+ regex = BREAKSCAPE_PLUSPLUS_REGEX;
149
+ replacer = BREAKSCAPE_PLUSPLUS_REGEX_REPLACER;
150
+ }
151
+ str = str.replace(regex, replacer);
152
+ // Ends - ensures that the start and end of the string are breakscaped in cases where the ends could otherwise
153
+ // come together to form a recognized sequence
154
+ if (opts.textFormat === TextFormat.bitmarkMinusMinus || opts.textFormat === TextFormat.bitmarkPlusPlus) {
155
+ str = str.replace(BREAKSCAPE_ENDS_REGEX, BREAKSCAPE_ENDS_REGEX_REPLACER);
156
+ }
136
157
  return str;
137
158
  };
138
159
  if (Array.isArray(val)) {
@@ -161,11 +182,17 @@ class Breakscape {
161
182
  unbreakscape(val, options) {
162
183
  if (val == null)
163
184
  return val;
164
- const opts = Object.assign({}, options);
185
+ const opts = Object.assign({}, DEFAULT_BREAKSCAPE_OPTIONS, options);
165
186
  const unbreakscapeStr = (str) => {
166
187
  if (!str)
167
188
  return str;
168
- str = str.replace(UNBREAKSCAPE_REGEX, UNBREAKSCAPE_REGEX_REPLACER);
189
+ let regex = UNBREAKSCAPE_PLAIN_IN_BODY_REGEX;
190
+ let replacer = UNBREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER;
191
+ if (opts.textFormat === TextFormat.bitmarkMinusMinus || opts.textFormat === TextFormat.bitmarkPlusPlus) {
192
+ regex = UNBREAKSCAPE_REGEX;
193
+ replacer = UNBREAKSCAPE_REGEX_REPLACER;
194
+ }
195
+ str = str.replace(regex, replacer);
169
196
  return str;
170
197
  };
171
198
  if (Array.isArray(val)) {
@@ -197,7 +224,7 @@ class Breakscape {
197
224
  breakscapeCode(val, options) {
198
225
  if (val == null)
199
226
  return val;
200
- const opts = Object.assign({}, options);
227
+ const opts = Object.assign({}, DEFAULT_BREAKSCAPE_OPTIONS, options);
201
228
  const breakscapeStr = (str) => {
202
229
  if (!str)
203
230
  return str;
@@ -1 +1 @@
1
- {"version":3,"file":"Breakscape.js","sourceRoot":"","sources":["../../../src/breakscaping/Breakscape.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AAEH,EAAE;AACF,eAAe;AACf,EAAE;AAEF,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,YAAY,GAAG,6CAA6C,CAAC;AACnE,M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IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAChE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC/C,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;gBACjB,IAAI,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC5B,GAAG,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;gBAC5B,CAAC;YACH,CAAC;YACD,GAAG,GAAG,MAAW,CAAC;QACpB,CAAC;aAAM,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACrC,GAAG,GAAG,aAAa,CAAC,GAAa,CAAM,CAAC;QAC1C,CAAC;QAED,OAAO,GAAmB,CAAC;IAC7B,CAAC;IAED;;;;;;OAMG;IACI,WAAW,CAAC,EAAqB,EAAE,EAAqB;QAC7D,OAAO,CAAC,EAAE,GAAG,EAAE,CAAsB,CAAC;IACxC,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,IAAI,UAAU,EAAE,CAAC;AAElC,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,CAAC"}
@@ -80,6 +80,7 @@ const BITS = {
80
80
  },
81
81
  ],
82
82
  },
83
+ [BitType.articleResponsiveAlt]: { since: '2.0.0', baseBitType: BitType.articleResponsive },
83
84
  [BitType.standardArticleNormative]: { since: '1.16.0', baseBitType: BitType.article },
84
85
  [BitType.standardArticleNonNormative]: { since: '1.16.0', baseBitType: BitType.article },
85
86
  [BitType.smartStandardArticleNormative]: { since: '1.28.0', baseBitType: BitType.standardArticleNormative },
@@ -453,6 +454,15 @@ const BITS = {
453
454
  type: BitTagType.property,
454
455
  configKey: PropertyConfigKey.quizStrikethroughSolutions,
455
456
  },
457
+ {
458
+ type: BitTagType.property,
459
+ configKey: PropertyConfigKey.quizStrikethroughSolutions,
460
+ },
461
+ {
462
+ type: BitTagType.property,
463
+ configKey: PropertyConfigKey.additionalSolutions,
464
+ maxCount: Count.infinity,
465
+ },
456
466
  {
457
467
  type: BitTagType.group,
458
468
  configKey: GroupConfigKey.group_gap,
@@ -497,6 +507,16 @@ const BITS = {
497
507
  ],
498
508
  textFormatDefault: TextFormat.text,
499
509
  },
510
+ [BitType.formula]: {
511
+ since: '1.35.0',
512
+ tags: [
513
+ {
514
+ type: BitTagType.group,
515
+ configKey: GroupConfigKey.group_standardTags,
516
+ },
517
+ ],
518
+ textFormatDefault: TextFormat.latex,
519
+ },
500
520
  [BitType.appCodeCell]: { since: '1.4.3', baseBitType: BitType.code },
501
521
  [BitType.appCodeEditor]: { since: '1.4.3', baseBitType: BitType.code },
502
522
  [BitType.appCodeIde]: { since: '1.4.3', baseBitType: BitType.code },
@@ -753,7 +773,6 @@ const BITS = {
753
773
  [BitType.danger]: { since: '1.3.0', baseBitType: BitType.article },
754
774
  [BitType.dangerAlt]: { since: '1.16.0', baseBitType: BitType.article },
755
775
  [BitType.definitionTerm]: { since: '1.34.0', baseBitType: BitType.article },
756
- [BitType.descriptionTerm]: { since: '1.33.0', baseBitType: BitType.article },
757
776
  [BitType.details1]: { since: '1.3.0', baseBitType: BitType.article },
758
777
  [BitType.details]: { since: '1.3.0', baseBitType: BitType.article },
759
778
  [BitType.editorial]: { since: '1.3.0', baseBitType: BitType.article },
@@ -1051,10 +1070,6 @@ const BITS = {
1051
1070
  ],
1052
1071
  cardSet: CardSetConfigKey._flashcardLike,
1053
1072
  },
1054
- [BitType.descriptionList]: {
1055
- since: '1.33.0',
1056
- baseBitType: BitType.definitionList,
1057
- },
1058
1073
  [BitType.flashcard]: {
1059
1074
  since: '1.3.0',
1060
1075
  tags: [
@@ -2136,6 +2151,10 @@ const BITS = {
2136
2151
  type: BitTagType.property,
2137
2152
  configKey: PropertyConfigKey.tableResizableColumns,
2138
2153
  },
2154
+ {
2155
+ type: BitTagType.property,
2156
+ configKey: PropertyConfigKey.tableColumnMinWidth,
2157
+ },
2139
2158
  ],
2140
2159
  cardSet: CardSetConfigKey._table,
2141
2160
  },