wikiparser-node 1.24.1 → 1.25.1

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 (58) hide show
  1. package/README.md +9 -4
  2. package/bundle/bundle-es8.min.js +24 -23
  3. package/bundle/bundle-lsp.min.js +28 -27
  4. package/bundle/bundle.min.js +25 -25
  5. package/dist/addon/token.js +1 -1
  6. package/dist/base.d.mts +2 -1
  7. package/dist/base.d.ts +2 -1
  8. package/dist/bin/config.js +1 -1
  9. package/dist/index.d.ts +4 -3
  10. package/dist/index.js +85 -55
  11. package/dist/lib/element.js +33 -29
  12. package/dist/lib/text.js +174 -171
  13. package/dist/mixin/hidden.js +1 -1
  14. package/dist/mixin/noEscape.js +9 -7
  15. package/dist/parser/links.js +10 -4
  16. package/dist/src/arg.js +39 -33
  17. package/dist/src/attribute.js +52 -38
  18. package/dist/src/attributes.js +54 -51
  19. package/dist/src/commented.js +2 -1
  20. package/dist/src/converterFlags.js +20 -18
  21. package/dist/src/converterRule.js +6 -3
  22. package/dist/src/extLink.js +6 -4
  23. package/dist/src/gallery.js +48 -42
  24. package/dist/src/heading.js +65 -61
  25. package/dist/src/html.js +75 -71
  26. package/dist/src/imageParameter.js +17 -15
  27. package/dist/src/imagemap.js +20 -18
  28. package/dist/src/index.js +100 -99
  29. package/dist/src/link/base.js +38 -33
  30. package/dist/src/link/category.js +11 -6
  31. package/dist/src/link/file.js +87 -76
  32. package/dist/src/link/galleryImage.js +8 -6
  33. package/dist/src/link/index.js +8 -6
  34. package/dist/src/link/redirectTarget.js +10 -8
  35. package/dist/src/magicLink.js +22 -20
  36. package/dist/src/nested.js +29 -27
  37. package/dist/src/nowiki/comment.js +11 -9
  38. package/dist/src/nowiki/index.js +9 -7
  39. package/dist/src/nowiki/listBase.js +8 -5
  40. package/dist/src/nowiki/quote.js +29 -25
  41. package/dist/src/paramTag/index.js +24 -22
  42. package/dist/src/parameter.js +29 -23
  43. package/dist/src/pre.js +1 -1
  44. package/dist/src/redirect.js +5 -3
  45. package/dist/src/syntax.js +1 -1
  46. package/dist/src/table/index.js +35 -31
  47. package/dist/src/table/td.js +24 -19
  48. package/dist/src/table/trBase.js +13 -11
  49. package/dist/src/tagPair/ext.js +13 -10
  50. package/dist/src/tagPair/include.js +13 -11
  51. package/dist/src/transclude.js +39 -37
  52. package/dist/util/constants.js +3 -1
  53. package/dist/util/lint.js +12 -9
  54. package/extensions/dist/base.js +4 -1
  55. package/i18n/en.json +77 -0
  56. package/i18n/zh-hans.json +71 -56
  57. package/i18n/zh-hant.json +71 -56
  58. package/package.json +2 -2
package/README.md CHANGED
@@ -17,11 +17,11 @@ WikiParser-Node is an offline [Wikitext](https://www.mediawiki.org/wiki/Wikitext
17
17
 
18
18
  ## Mini (also known as [WikiLint](https://www.npmjs.com/package/wikilint))
19
19
 
20
- This version provides a [CLI](https://en.wikipedia.org/wiki/Command-line_interface), but only retains the parsing functionality and linting functionality. The parsed AST cannot be modified. It is used for the [WikiParser Language Server](https://marketplace.visualstudio.com/items?itemName=Bhsd.vscode-extension-wikiparser) VS Code extension.
20
+ This version provides a [CLI](https://en.wikipedia.org/wiki/Command-line_interface), but only retains the parsing functionality and linting functionality. The parsed AST cannot be modified. It is used for the [Wikitext LSP](https://www.npmjs.com/package/wikitext-lsp) the [WikiParser Language Server](https://marketplace.visualstudio.com/items?itemName=Bhsd.vscode-extension-wikiparser) VS Code extension.
21
21
 
22
22
  ## Browser-compatible
23
23
 
24
- A browser-compatible version, which can be used for code highlighting or as a linting plugin in conjunction with editors such as [CodeMirror](https://codemirror.net/) and [Monaco](https://microsoft.github.io/monaco-editor/). ([Usage example](https://bhsd-harry.github.io/wikiparser-node))
24
+ A browser-compatible version, which can be used for code highlighting or as a linting plugin in conjunction with editors such as [CodeMirror](https://www.npmjs.com/package/@bhsd/codemirror-mediawiki) and [Monaco](https://www.npmjs.com/package/monaco-wiki). ([Usage example](https://bhsd-harry.github.io/wikiparser-node))
25
25
 
26
26
  # Installation
27
27
 
@@ -50,7 +50,7 @@ You can download the code via CDN, for example:
50
50
  or
51
51
 
52
52
  ```html
53
- <script src="//unpkg.com/wikiparser-node/bundle/bundle.min.js"></script>
53
+ <script src="//unpkg.com/wikiparser-node/bundle/bundle-lsp.min.js"></script>
54
54
  ```
55
55
 
56
56
  For more browser extensions, please refer to the corresponding [documentation](https://github.com/bhsd-harry/wikiparser-node/wiki/Browser-%28EN%29).
@@ -80,7 +80,7 @@ Please refer to the [Wiki](https://github.com/bhsd-harry/wikiparser-node/wiki/Ho
80
80
 
81
81
  # Performance
82
82
 
83
- A full database dump (`*.xml.bz2`) scan of Chinese Wikipedia's ~3.5 million articles (parsing and linting) on a personal MacBook Air takes about 3 hours.
83
+ A full database dump (`*.xml.bz2`) [scan](https://www.npmjs.com/package/lint-wiki-dumps) of English Wikipedia's ~19 million articles (parsing and linting) on a personal MacBook Air takes about 5 hours.
84
84
 
85
85
  # Known issues
86
86
 
@@ -93,6 +93,9 @@ A full database dump (`*.xml.bz2`) scan of Chinese Wikipedia's ~3.5 million arti
93
93
 
94
94
  ## HTML conversion
95
95
 
96
+ <details>
97
+ <summary>Expand</summary>
98
+
96
99
  ### Extension
97
100
 
98
101
  1. Many extensions are not supported, such as `<indicator>` and `<ref>`.
@@ -140,3 +143,5 @@ A full database dump (`*.xml.bz2`) scan of Chinese Wikipedia's ~3.5 million arti
140
143
  ### Miscellaneous
141
144
 
142
145
  1. Illegal HTML entities ([Example](http://bhsd-harry.github.io/wikiparser-node/tests.html#Illegal%20character%20references%20(T106578%2C%20T113194))).
146
+
147
+ </details>