securemark 0.257.1 → 0.258.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 (82) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +21 -8
  3. package/dist/index.js +1224 -611
  4. package/markdown.d.ts +1 -28
  5. package/package.json +9 -9
  6. package/src/combinator/control/manipulation/convert.ts +8 -4
  7. package/src/combinator/control/manipulation/scope.ts +10 -2
  8. package/src/combinator/data/parser/context/delimiter.ts +70 -0
  9. package/src/combinator/data/parser/context/memo.ts +30 -0
  10. package/src/combinator/{control/manipulation → data/parser}/context.test.ts +9 -9
  11. package/src/combinator/data/parser/context.ts +161 -0
  12. package/src/combinator/data/parser/inits.ts +1 -1
  13. package/src/combinator/data/parser/sequence.test.ts +1 -1
  14. package/src/combinator/data/parser/sequence.ts +1 -1
  15. package/src/combinator/data/parser/some.test.ts +1 -1
  16. package/src/combinator/data/parser/some.ts +14 -37
  17. package/src/combinator/data/parser/subsequence.test.ts +1 -1
  18. package/src/combinator/data/parser/union.test.ts +1 -1
  19. package/src/combinator/data/parser.ts +7 -47
  20. package/src/combinator.ts +1 -2
  21. package/src/parser/api/bind.ts +5 -5
  22. package/src/parser/api/parse.ts +3 -1
  23. package/src/parser/block/blockquote.ts +1 -1
  24. package/src/parser/block/dlist.ts +4 -10
  25. package/src/parser/block/extension/figure.ts +4 -3
  26. package/src/parser/block/extension/table.ts +2 -2
  27. package/src/parser/block/heading.ts +5 -13
  28. package/src/parser/block/ilist.ts +3 -2
  29. package/src/parser/block/olist.ts +10 -7
  30. package/src/parser/block/paragraph.ts +1 -1
  31. package/src/parser/block/reply/cite.ts +1 -1
  32. package/src/parser/block/reply/quote.ts +1 -1
  33. package/src/parser/block/reply.ts +1 -1
  34. package/src/parser/block/sidefence.ts +1 -1
  35. package/src/parser/block/table.test.ts +5 -0
  36. package/src/parser/block/table.ts +14 -13
  37. package/src/parser/block/ulist.ts +4 -3
  38. package/src/parser/block.ts +1 -1
  39. package/src/parser/context.ts +32 -0
  40. package/src/parser/header.ts +1 -1
  41. package/src/parser/inline/annotation.ts +9 -17
  42. package/src/parser/inline/autolink/email.ts +1 -1
  43. package/src/parser/inline/autolink/url.ts +2 -2
  44. package/src/parser/inline/autolink.ts +5 -3
  45. package/src/parser/inline/bracket.test.ts +2 -0
  46. package/src/parser/inline/bracket.ts +16 -15
  47. package/src/parser/inline/code.ts +1 -1
  48. package/src/parser/inline/comment.test.ts +1 -0
  49. package/src/parser/inline/comment.ts +4 -3
  50. package/src/parser/inline/deletion.ts +5 -4
  51. package/src/parser/inline/emphasis.ts +5 -4
  52. package/src/parser/inline/emstrong.ts +5 -4
  53. package/src/parser/inline/extension/index.ts +8 -15
  54. package/src/parser/inline/extension/indexee.ts +8 -10
  55. package/src/parser/inline/extension/indexer.ts +4 -3
  56. package/src/parser/inline/extension/label.ts +3 -2
  57. package/src/parser/inline/extension/placeholder.ts +6 -5
  58. package/src/parser/inline/html.ts +5 -4
  59. package/src/parser/inline/htmlentity.ts +1 -1
  60. package/src/parser/inline/insertion.ts +5 -4
  61. package/src/parser/inline/link.ts +12 -21
  62. package/src/parser/inline/mark.ts +5 -4
  63. package/src/parser/inline/math.ts +8 -9
  64. package/src/parser/inline/media.ts +8 -7
  65. package/src/parser/inline/reference.ts +12 -18
  66. package/src/parser/inline/ruby.ts +4 -3
  67. package/src/parser/inline/shortmedia.ts +3 -2
  68. package/src/parser/inline/strong.ts +5 -4
  69. package/src/parser/inline/template.test.ts +1 -1
  70. package/src/parser/inline/template.ts +9 -6
  71. package/src/parser/inline.test.ts +2 -0
  72. package/src/parser/locale.ts +6 -7
  73. package/src/parser/processor/footnote.ts +5 -3
  74. package/src/parser/source/text.ts +1 -1
  75. package/src/parser/util.ts +0 -220
  76. package/src/parser/visibility.ts +205 -0
  77. package/src/util/info.ts +4 -2
  78. package/src/util/quote.ts +12 -15
  79. package/src/util/toc.ts +14 -17
  80. package/webpack.config.js +1 -0
  81. package/src/combinator/control/manipulation/context.ts +0 -70
  82. package/src/combinator/control/manipulation/resource.ts +0 -54
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.258.0
4
+
5
+ - Introduce memoization.
6
+
7
+ ## 0.257.3
8
+
9
+ - Fix styled table parser.
10
+
11
+ ## 0.257.2
12
+
13
+ - Fix operator precedence.
14
+
3
15
  ## 0.257.1
4
16
 
5
17
  - Refactoring.
package/README.md CHANGED
@@ -22,6 +22,15 @@ Secure markdown renderer working on browsers for user input data.
22
22
  - Cross reference generation for annotations and references.
23
23
  - Table of contents.
24
24
 
25
+ ## Media
26
+
27
+ - Twitter
28
+ - YouTube
29
+ - PDF (.pdf)
30
+ - Video (.webm, .ogv)
31
+ - Audio (.oga, .ogg)
32
+ - Images
33
+
25
34
  ## Demos
26
35
 
27
36
  https://falsandtru.github.io/securemark/
@@ -58,14 +67,18 @@ https://falsandtru.github.io/securemark/
58
67
  - Template ({{ template }})
59
68
  - Comment ([% comment %])
60
69
 
61
- ## Media
62
-
63
- - Twitter
64
- - YouTube
65
- - PDF (.pdf)
66
- - Video (.webm, .ogv)
67
- - Audio (.oga, .ogg)
68
- - Images
70
+ ## Operator precedence
71
+
72
+ |P| Operators |
73
+ |-|-------------------|
74
+ |9| \n, \\\n |
75
+ |8| `, " |
76
+ |6| (()), [[]], ${}$ |
77
+ |5| \<tag>\</tag> |
78
+ |4| [% %] |
79
+ |3| $ |
80
+ |2| (), [], {} |
81
+ |1| *, **, ==, ++, ~~ |
69
82
 
70
83
  ## Dependencies
71
84