@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,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Breakscape = void 0;
4
+ const TextFormat_1 = require("../model/enum/TextFormat");
4
5
  const StringUtils_1 = require("../utils/StringUtils");
5
6
  /**
6
7
  * Utility class for breakscaping strings.
@@ -12,109 +13,114 @@ const StringUtils_1 = require("../utils/StringUtils");
12
13
  * being broken (split) by a special charater.
13
14
  *
14
15
  * The special character is ^
15
- * To include the special character in a text where it breakscapes, use ^^ (once), ^^^ (twice), etc.
16
+ * To include the special character in a text which is breakscaped, use ^^ (once), ^^^ (twice), etc.
16
17
  *
17
- * The following sequences can be breakscaped:
18
- * - inline: == ==> =^=
19
- * - title block: (SOL)[##]#(space) ==> (SOL)[##]#^(space)
20
- * - new block: (SOL)|(WS EOL) ==> (SOL)|^(WS EOL)
21
- * - code block: (SOL)|code(:type) ==> (SOL)|^code(:type)
22
- * - image block: (SOL)|image:(url) ==> (SOL)|^image:(url)
23
- * - bullet list: (SOL)•(space) ==> (SOL)•^(space)
24
- * - ordered list: (SOL)•1(space) ==> (SOL)•^1(space)
25
- * - tag list +: (SOL)•+(space) ==> (SOL)•^+(space)
26
- * - tag list -: (SOL)•-(space) ==> (SOL)•^-(space)
27
- * - bold: ** ==> *^*
28
- * - light: `` ==> `^`
29
- * - italic: __ ==> _^_
30
- * - highlight: !! ==> !^!
31
- * - start of bit: [. ==> [^.
32
- * - start of property: [@ ==> [^@
33
- * - start of title: [# ==> [^#
34
- * - start of anchor: [▼ ==> [^▼
35
- * - start of reference: [► ==> [^►
36
- * - start of item/lead: [% ==> [^%
37
- * - start of instruction: [! ==> [^!
38
- * - start of hint: [? ==> [^?
39
- * - start of true statement: [+ ==> [^+
40
- * - start of false statement: [- ==> [^-
41
- * - start of sample solution: [$ ==> [^$
42
- * - start of gap: [_ ==> [^_
43
- * - start of mark: [= ==> [^=
44
- * - start of resource: [& ==> [^&
45
- * - end of tag: ] ==> ^]
18
+ * Any sequence can be breakscaped by breaking it with a ^ character.
46
19
  *
20
+ * The following unbreakscaping rules are applied when unbreakscaping text:
21
+ * - hat: ^ ==>
22
+ * - hat: ^^ ==> ^
23
+ * - hat: ^..N ==> ^..N-1
47
24
  *
48
- * The following are breakscaped with ^ in between. Just add more ^s to increase the number of ^ string:
49
- * - inline / card set start: =^= ==> =^^=
50
- * - footer: ~^~ ==> ~^^~
51
- * - title block: (SOL)[##]#^(space) ==> (SOL)[##]#^^(space)
52
- * - new block: (SOL)|^(WS EOL) ==> (SOL)|^^(WS EOL)
53
- * - code block: (SOL)|^code(:type) ==> (SOL)|^^code(:type)
54
- * - image block: (SOL)|^image:(url) ==> (SOL)|^^image:(url)
55
- * - bullet list: (SOL)•^(space) ==> (SOL)•^^(space)
56
- * - ordered list: (SOL)•^1(space) ==> (SOL)•^^1(space)
57
- * - tag list +: (SOL)•^+(space) ==> (SOL)•^^+(space)
58
- * - tag list -: (SOL)•^-(space) ==> (SOL)•^^-(space)
59
- * - bold: *^* ==> *^^*
60
- * - light: `^` ==> `^^`
61
- * - italic: _^_ ==> _^^_
62
- * - highlight: !^! ==> !^^!
63
- * - start of bit: [^. ==> [^^.
64
- * - start of property: [^@ ==> [^^@
65
- * - start of title: [^# ==> [^^#
66
- * - start of anchor: [^▼ ==> [^^▼
67
- * - start of reference: [^► ==> [^^►
68
- * - start of item/lead: [^% ==> [^^%
69
- * - start of instruction: [^! ==> [^^!
70
- * - start of hint: [^? ==> [^^?
71
- * - start of true statement: [^+ ==> [^^+
72
- * - start of false statement: [^- ==> [^^-
73
- * - start of sample solution: [^$ ==> [^^$
74
- * - start of gap: [^_ ==> [^^_
75
- * - start of mark: [^= ==> [^^=
76
- * - start of resource: [^& ==> [^^&
77
- * - end of tag: ^] ==> ^^]
25
+ * The following breakscaping rules are applied when breakscaping text:
26
+ * - hat: ^ ==> ^^ [bitmark-- / bitmark++]
27
+ * - hat: ^^ ==> ^^^ [bitmark-- / bitmark++]
28
+ * - hat: ^..N ==> ^..N+1 [bitmark-- / bitmark++]
29
+ * - inline: == ==> =^= [bitmark++]
30
+ * - title block: (SOL)[##]#(space) ==> (SOL)[##]#^(space) [bitmark++]
31
+ * - new block: (SOL)|(WS EOL) ==> (SOL)|^(WS EOL) [bitmark++]
32
+ * - code block: (SOL)|code(:type) ==> (SOL)|^code(:type) [bitmark++]
33
+ * - image block: (SOL)|image:(url) ==> (SOL)|^image:(url) [bitmark++]
34
+ * - bullet list: (SOL)(space) ==> (SOL)•^(space) [bitmark++]
35
+ * - simple list: (SOL)•_(space) ==> (SOL)•^_(space) [bitmark++]
36
+ * - ordered list (numeric): (SOL)•<numbers>(space) ==> (SOL)•^<numbers>(space) [bitmark++]
37
+ * - ordered list: (roman,lower) (SOL)•<numbers>i(space) ==> (SOL)•^<numbers>i(space) [bitmark++]
38
+ * - ordered list: (roman,upper) (SOL)•<numbers>I(space) ==> (SOL)•^<numbers>I(space) [bitmark++]
39
+ * - ordered list: (SOL)•<letters>(space) ==> (SOL)•^<letters>(space) [bitmark++]
40
+ * - tag list +: (SOL)•+(space) ==> (SOL)•^+(space) [bitmark++]
41
+ * - tag list -: (SOL)•-(space) ==> (SOL)•^-(space) [bitmark++]
42
+ * - bold: ** ==> *^* [bitmark-- / bitmark++]
43
+ * - half-bold (at end): *<end> ==> *^<end> [bitmark-- / bitmark++]
44
+ * - half-bold (at start): <start>* ==> <start>^* [bitmark-- / bitmark++]
45
+ * - light: `` ==> `^` [bitmark-- / bitmark++]
46
+ * - half-light (at end): `<end> ==> `^<end> [bitmark-- / bitmark++]
47
+ * - half-light (at start): <start>` ==> <start>^` [bitmark-- / bitmark++]
48
+ * - italic: __ ==> _^_ [bitmark-- / bitmark++]
49
+ * - half-italic (at end): _<end> ==> _^<end> [bitmark-- / bitmark++]
50
+ * - half-italic (at start): <start>_ ==> <start>^_ [bitmark-- / bitmark++]
51
+ * - highlight: !! ==> !^! [bitmark-- / bitmark++]
52
+ * - half-highlight (at end): !<end> ==> !^<end> [bitmark-- / bitmark++]
53
+ * - half-highlight (at start): <start>! ==> <start>^! [bitmark-- / bitmark++]
54
+ * - start of bit (at end): [<end> ==> [^<end> [bitmark-- / bitmark++]
55
+ * - start of bit: [. ==> [^. [bitmark-- / bitmark++]
56
+ * - start of property: [@ ==> [^@ [bitmark-- / bitmark++]
57
+ * - start of title: [# ==> [^# [bitmark-- / bitmark++]
58
+ * - start of anchor: [▼ ==> [^▼ [bitmark-- / bitmark++]
59
+ * - start of reference: [► ==> [^► [bitmark-- / bitmark++]
60
+ * - start of item/lead: [% ==> [^% [bitmark-- / bitmark++]
61
+ * - start of instruction: [! ==> [^! [bitmark-- / bitmark++]
62
+ * - start of hint: [? ==> [^? [bitmark-- / bitmark++]
63
+ * - start of true statement: [+ ==> [^+ [bitmark-- / bitmark++]
64
+ * - start of false statement: [- ==> [^- [bitmark-- / bitmark++]
65
+ * - start of sample solution: [$ ==> [^$ [bitmark-- / bitmark++]
66
+ * - start of gap: [_ ==> [^_ [bitmark-- / bitmark++]
67
+ * - start of mark: [= ==> [^= [bitmark-- / bitmark++]
68
+ * - start of resource: [& ==> [^& [bitmark-- / bitmark++]
69
+ * - end of tag: ] ==> ^] [bitmark-- / bitmark++]
70
+ *
71
+ * In non- bitmark++ / bitmark-- text, breakscaping is only applied to bit tags.
72
+ * This is true for both breakscaping and unbreakscaping.
73
+ *
74
+ * The following unbreakscaping rules are applied when unbreakscaping plain text:
75
+ * - start of bit: <line start>[^. ==> <line start>[.
76
+ * - start of bit: <line start>[^^. ==> <line start>[^.
77
+ * - start of bit: <line start>[^..N. ==> <line start>[^..N-1.
78
+ *
79
+ * The following breakscaping rules are applied when breakscaping plain text:
80
+ * - start of bit: <line start>[. ==> <line start>[^.
81
+ * - start of bit: <line start>[^. ==> <line start>[^^.
82
+ * - start of bit: <line start>[^..N. ==> <line start>[^..N+1.
78
83
  */
79
84
  //
80
85
  // Breakscaping
81
86
  //
82
- const REGEX_MARKS = /([*`_!=~])([\^]*)\1/;
83
- const REGEX_BLOCKS = /^(\|)([\^]*)(code[\s]*|code:|image:|[\s]*$)/;
84
- const REGEX_TITLE_BLOCKS = /^([#]{1,3})([\^]*)([^\S\r\n]+)/;
85
- const REGEX_LIST_BLOCKS = /^(•)([\^]*)(1|\+|-|)([^\S\r\n]+)/;
86
- const REGEX_START_OF_TAG = /(\[)([\^]*)([.@#▼►%!?+\-$_=&])/;
87
- const REGEX_END_OF_TAG = /([\^]*)(])/;
88
- 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}`;
89
- const UNBREAKSCAPE_REGEX_SOURCE = BREAKSCAPE_REGEX_SOURCE.replace(/(\(\[\\\^\]\*\))/g, '\\^$1'); // Add ^ into the regex
90
- // Regex groups in BODY (bitmark++):
91
- // 1: start of MARK
92
- // 2: ^ in MARK
93
- // 3: start of BLOCK
94
- // 4: ^ in BLOCK
95
- // 5: end of BLOCK
96
- // 6: start of TITLE_BLOCK
97
- // 7: ^ in TITLE_BLOCK
98
- // 8: end of TITLE_BLOCK
99
- // 9: start of LIST_BLOCK
100
- // 10: ^ in LIST_BLOCK
101
- // 11: end of LIST_BLOCK part 1
102
- // 12: end of LIST_BLOCK part 2
103
- // 13: start of START_OF_TAG block
104
- // 14: ^ in START_OF_TAG block
105
- // 15: end of START_OF_TAG block
106
- // 16: ^ in END_OF_TAG block
107
- // 17: end of END_OF_TAG block
108
- const BREAKSCAPE_REGEX = new RegExp(BREAKSCAPE_REGEX_SOURCE, 'gm');
109
- const BREAKSCAPE_REGEX_REPLACER = '$1$3$6$9$13^$2$1$4$5$7$8$10$11$12$14$15$16$17';
110
- const UNBREAKSCAPE_REGEX = new RegExp(UNBREAKSCAPE_REGEX_SOURCE, 'gm');
111
- const UNBREAKSCAPE_REGEX_REPLACER = BREAKSCAPE_REGEX_REPLACER.replace(/\^/g, ''); // Remove ^ from the regex replacer
87
+ const REGEX_MARKS = /([*`_!=])(?=\1)/; // $1^
88
+ const REGEX_BLOCKS = /^(\|)(code[\s]*|code:|image:|[\s]*$)/; // $2^$3
89
+ const REGEX_TITLE_BLOCKS = /^([#]{1,3})([^\S\r\n]+)/; // $4^$5
90
+ const REGEX_LIST_BLOCKS = /^(•)([0-9]+[iI]*|[a-zA-Z]{1}|_|\+|-|)([^\S\r\n]+)/; // $6^$7$8
91
+ const REGEX_START_OF_TAG = /(\[)([.@#▼►%!?+\-$_=&])/; // $9^$10 / $2^$3
92
+ const REGEX_FOOTER_DIVIDER = /^(~)(~~~)[ \t]*$/; // $11^$12 / $4^$5
93
+ const REGEX_PLAIN_TEXT_DIVIDER = /^(\$)(\$\$\$)[ \t]*$/; // $13^$14 / $6^$7
94
+ const REGEX_END_OF_TAG = /(\^*])/; // ^$15 / ^$8
95
+ const REGEX_HATS = /(\^+)/; // $16^ / ^$9 // Must be last
96
+ 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}`;
97
+ 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}`;
98
+ const REGEX_START = /^([*`_!=])/; // ^$1
99
+ const REGEX_END = /([*`_!=\\[])$/; // $2^
100
+ const BREAKSCAPE_ENDS_REGEX_SOURCE = `${REGEX_START.source}|${REGEX_END.source}`;
101
+ const BREAKSCAPE_PLUSPLUS_REGEX = new RegExp(BREAKSCAPE_PLUSPLUS_REGEX_SOURCE, 'gm');
102
+ const BREAKSCAPE_PLUSPLUS_REGEX_REPLACER = '$1$2$4$6$9$11$13$16^$3$5$7$8$10$12$14$15';
103
+ const BREAKSCAPE_MINUSMINUS_REGEX = new RegExp(BREAKSCAPE_MINUSMINUS_REGEX_SOURCE, 'gm');
104
+ const BREAKSCAPE_MINUSMINUS_REGEX_REPLACER = '$1$2$4$6^$3$5$7$8$9';
105
+ const BREAKSCAPE_PLAIN_IN_BODY_REGEX = new RegExp('^(\\[)(\\^*)(\\.)', 'gm');
106
+ const BREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER = '$1^$2$3';
107
+ const BREAKSCAPE_ENDS_REGEX = new RegExp(BREAKSCAPE_ENDS_REGEX_SOURCE, 'g');
108
+ const BREAKSCAPE_ENDS_REGEX_REPLACER = '$2^$1';
109
+ // const UNBREAKSCAPE_REGEX = new RegExp(UNBREAKSCAPE_REGEX_SOURCE, 'gm');
110
+ // const UNBREAKSCAPE_REGEX_REPLACER = BREAKSCAPE_REGEX_REPLACER.replace(/\^/g, ''); // Remove ^ from the regex replacer
111
+ const UNBREAKSCAPE_REGEX = new RegExp('\\^([\\^]*)', 'gm');
112
+ const UNBREAKSCAPE_REGEX_REPLACER = '$1';
113
+ const UNBREAKSCAPE_PLAIN_IN_BODY_REGEX = new RegExp('^(\\[)\\^(\\^*)(\\.)', 'gm');
114
+ const UNBREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER = '$1$2$3';
112
115
  // Regex explanation:
113
116
  // - match a single | or • or # character at the start of a line and capture in group 1
114
117
  // This will capture all new block characters within the code text.
115
118
  // Replace with group 1, ^
116
119
  const BREAKSCAPE_CODE_REGEX = new RegExp('^(\\||•|#)', 'gm');
117
120
  const BREAKSCAPE_CODE_REGEX_REPLACER = '$1^';
121
+ const DEFAULT_BREAKSCAPE_OPTIONS = {
122
+ textFormat: TextFormat_1.TextFormat.bitmarkMinusMinus,
123
+ };
118
124
  class Breakscape {
119
125
  constructor() {
120
126
  this.EMPTY_STRING = '';
@@ -131,11 +137,26 @@ class Breakscape {
131
137
  breakscape(val, options) {
132
138
  if (val == null)
133
139
  return val;
134
- const opts = Object.assign({}, options);
140
+ const opts = Object.assign({}, DEFAULT_BREAKSCAPE_OPTIONS, options);
135
141
  const breakscapeStr = (str) => {
136
142
  if (!str)
137
143
  return str;
138
- str = str.replace(BREAKSCAPE_REGEX, BREAKSCAPE_REGEX_REPLACER);
144
+ let regex = BREAKSCAPE_PLAIN_IN_BODY_REGEX;
145
+ let replacer = BREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER;
146
+ if (opts.textFormat === TextFormat_1.TextFormat.bitmarkMinusMinus) {
147
+ regex = BREAKSCAPE_MINUSMINUS_REGEX;
148
+ replacer = BREAKSCAPE_MINUSMINUS_REGEX_REPLACER;
149
+ }
150
+ else if (opts.textFormat === TextFormat_1.TextFormat.bitmarkPlusPlus) {
151
+ regex = BREAKSCAPE_PLUSPLUS_REGEX;
152
+ replacer = BREAKSCAPE_PLUSPLUS_REGEX_REPLACER;
153
+ }
154
+ str = str.replace(regex, replacer);
155
+ // Ends - ensures that the start and end of the string are breakscaped in cases where the ends could otherwise
156
+ // come together to form a recognized sequence
157
+ if (opts.textFormat === TextFormat_1.TextFormat.bitmarkMinusMinus || opts.textFormat === TextFormat_1.TextFormat.bitmarkPlusPlus) {
158
+ str = str.replace(BREAKSCAPE_ENDS_REGEX, BREAKSCAPE_ENDS_REGEX_REPLACER);
159
+ }
139
160
  return str;
140
161
  };
141
162
  if (Array.isArray(val)) {
@@ -164,11 +185,17 @@ class Breakscape {
164
185
  unbreakscape(val, options) {
165
186
  if (val == null)
166
187
  return val;
167
- const opts = Object.assign({}, options);
188
+ const opts = Object.assign({}, DEFAULT_BREAKSCAPE_OPTIONS, options);
168
189
  const unbreakscapeStr = (str) => {
169
190
  if (!str)
170
191
  return str;
171
- str = str.replace(UNBREAKSCAPE_REGEX, UNBREAKSCAPE_REGEX_REPLACER);
192
+ let regex = UNBREAKSCAPE_PLAIN_IN_BODY_REGEX;
193
+ let replacer = UNBREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER;
194
+ if (opts.textFormat === TextFormat_1.TextFormat.bitmarkMinusMinus || opts.textFormat === TextFormat_1.TextFormat.bitmarkPlusPlus) {
195
+ regex = UNBREAKSCAPE_REGEX;
196
+ replacer = UNBREAKSCAPE_REGEX_REPLACER;
197
+ }
198
+ str = str.replace(regex, replacer);
172
199
  return str;
173
200
  };
174
201
  if (Array.isArray(val)) {
@@ -200,7 +227,7 @@ class Breakscape {
200
227
  breakscapeCode(val, options) {
201
228
  if (val == null)
202
229
  return val;
203
- const opts = Object.assign({}, options);
230
+ const opts = Object.assign({}, DEFAULT_BREAKSCAPE_OPTIONS, options);
204
231
  const breakscapeStr = (str) => {
205
232
  if (!str)
206
233
  return str;
@@ -1 +1 @@
1
- {"version":3,"file":"Breakscape.js","sourceRoot":"","sources":["../../../src/breakscaping/Breakscape.ts"],"names":[],"mappings":";;;AACA,sDAAmD;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AAEH,E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;YACvB,MAAM,MAAM,GAAc,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,yBAAW,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,yBAAW,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;AAEb,8BAAU"}
@@ -83,6 +83,7 @@ const BITS = {
83
83
  },
84
84
  ],
85
85
  },
86
+ [BitType_1.BitType.articleResponsiveAlt]: { since: '2.0.0', baseBitType: BitType_1.BitType.articleResponsive },
86
87
  [BitType_1.BitType.standardArticleNormative]: { since: '1.16.0', baseBitType: BitType_1.BitType.article },
87
88
  [BitType_1.BitType.standardArticleNonNormative]: { since: '1.16.0', baseBitType: BitType_1.BitType.article },
88
89
  [BitType_1.BitType.smartStandardArticleNormative]: { since: '1.28.0', baseBitType: BitType_1.BitType.standardArticleNormative },
@@ -456,6 +457,15 @@ const BITS = {
456
457
  type: BitTagType_1.BitTagType.property,
457
458
  configKey: PropertyConfigKey_1.PropertyConfigKey.quizStrikethroughSolutions,
458
459
  },
460
+ {
461
+ type: BitTagType_1.BitTagType.property,
462
+ configKey: PropertyConfigKey_1.PropertyConfigKey.quizStrikethroughSolutions,
463
+ },
464
+ {
465
+ type: BitTagType_1.BitTagType.property,
466
+ configKey: PropertyConfigKey_1.PropertyConfigKey.additionalSolutions,
467
+ maxCount: Count_1.Count.infinity,
468
+ },
459
469
  {
460
470
  type: BitTagType_1.BitTagType.group,
461
471
  configKey: GroupConfigKey_1.GroupConfigKey.group_gap,
@@ -500,6 +510,16 @@ const BITS = {
500
510
  ],
501
511
  textFormatDefault: TextFormat_1.TextFormat.text,
502
512
  },
513
+ [BitType_1.BitType.formula]: {
514
+ since: '1.35.0',
515
+ tags: [
516
+ {
517
+ type: BitTagType_1.BitTagType.group,
518
+ configKey: GroupConfigKey_1.GroupConfigKey.group_standardTags,
519
+ },
520
+ ],
521
+ textFormatDefault: TextFormat_1.TextFormat.latex,
522
+ },
503
523
  [BitType_1.BitType.appCodeCell]: { since: '1.4.3', baseBitType: BitType_1.BitType.code },
504
524
  [BitType_1.BitType.appCodeEditor]: { since: '1.4.3', baseBitType: BitType_1.BitType.code },
505
525
  [BitType_1.BitType.appCodeIde]: { since: '1.4.3', baseBitType: BitType_1.BitType.code },
@@ -756,7 +776,6 @@ const BITS = {
756
776
  [BitType_1.BitType.danger]: { since: '1.3.0', baseBitType: BitType_1.BitType.article },
757
777
  [BitType_1.BitType.dangerAlt]: { since: '1.16.0', baseBitType: BitType_1.BitType.article },
758
778
  [BitType_1.BitType.definitionTerm]: { since: '1.34.0', baseBitType: BitType_1.BitType.article },
759
- [BitType_1.BitType.descriptionTerm]: { since: '1.33.0', baseBitType: BitType_1.BitType.article },
760
779
  [BitType_1.BitType.details1]: { since: '1.3.0', baseBitType: BitType_1.BitType.article },
761
780
  [BitType_1.BitType.details]: { since: '1.3.0', baseBitType: BitType_1.BitType.article },
762
781
  [BitType_1.BitType.editorial]: { since: '1.3.0', baseBitType: BitType_1.BitType.article },
@@ -1054,10 +1073,6 @@ const BITS = {
1054
1073
  ],
1055
1074
  cardSet: CardSetConfigKey_1.CardSetConfigKey._flashcardLike,
1056
1075
  },
1057
- [BitType_1.BitType.descriptionList]: {
1058
- since: '1.33.0',
1059
- baseBitType: BitType_1.BitType.definitionList,
1060
- },
1061
1076
  [BitType_1.BitType.flashcard]: {
1062
1077
  since: '1.3.0',
1063
1078
  tags: [
@@ -2139,6 +2154,10 @@ const BITS = {
2139
2154
  type: BitTagType_1.BitTagType.property,
2140
2155
  configKey: PropertyConfigKey_1.PropertyConfigKey.tableResizableColumns,
2141
2156
  },
2157
+ {
2158
+ type: BitTagType_1.BitTagType.property,
2159
+ configKey: PropertyConfigKey_1.PropertyConfigKey.tableColumnMinWidth,
2160
+ },
2142
2161
  ],
2143
2162
  cardSet: CardSetConfigKey_1.CardSetConfigKey._table,
2144
2163
  },