@depup/markdown-it 14.1.1-depup.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 (61) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +31 -0
  3. package/bin/markdown-it.mjs +107 -0
  4. package/changes.json +10 -0
  5. package/dist/index.cjs.js +5547 -0
  6. package/dist/markdown-it.js +6969 -0
  7. package/dist/markdown-it.min.js +2 -0
  8. package/index.mjs +1 -0
  9. package/lib/common/html_blocks.mjs +67 -0
  10. package/lib/common/html_re.mjs +25 -0
  11. package/lib/common/utils.mjs +304 -0
  12. package/lib/helpers/index.mjs +11 -0
  13. package/lib/helpers/parse_link_destination.mjs +77 -0
  14. package/lib/helpers/parse_link_label.mjs +49 -0
  15. package/lib/helpers/parse_link_title.mjs +66 -0
  16. package/lib/index.mjs +565 -0
  17. package/lib/parser_block.mjs +134 -0
  18. package/lib/parser_core.mjs +62 -0
  19. package/lib/parser_inline.mjs +197 -0
  20. package/lib/presets/commonmark.mjs +88 -0
  21. package/lib/presets/default.mjs +47 -0
  22. package/lib/presets/zero.mjs +70 -0
  23. package/lib/renderer.mjs +322 -0
  24. package/lib/ruler.mjs +340 -0
  25. package/lib/rules_block/blockquote.mjs +209 -0
  26. package/lib/rules_block/code.mjs +30 -0
  27. package/lib/rules_block/fence.mjs +94 -0
  28. package/lib/rules_block/heading.mjs +51 -0
  29. package/lib/rules_block/hr.mjs +40 -0
  30. package/lib/rules_block/html_block.mjs +69 -0
  31. package/lib/rules_block/lheading.mjs +82 -0
  32. package/lib/rules_block/list.mjs +331 -0
  33. package/lib/rules_block/paragraph.mjs +46 -0
  34. package/lib/rules_block/reference.mjs +212 -0
  35. package/lib/rules_block/state_block.mjs +220 -0
  36. package/lib/rules_block/table.mjs +228 -0
  37. package/lib/rules_core/block.mjs +13 -0
  38. package/lib/rules_core/inline.mjs +11 -0
  39. package/lib/rules_core/linkify.mjs +134 -0
  40. package/lib/rules_core/normalize.mjs +17 -0
  41. package/lib/rules_core/replacements.mjs +101 -0
  42. package/lib/rules_core/smartquotes.mjs +193 -0
  43. package/lib/rules_core/state_core.mjs +17 -0
  44. package/lib/rules_core/text_join.mjs +43 -0
  45. package/lib/rules_inline/autolink.mjs +72 -0
  46. package/lib/rules_inline/backticks.mjs +60 -0
  47. package/lib/rules_inline/balance_pairs.mjs +124 -0
  48. package/lib/rules_inline/emphasis.mjs +123 -0
  49. package/lib/rules_inline/entity.mjs +51 -0
  50. package/lib/rules_inline/escape.mjs +69 -0
  51. package/lib/rules_inline/fragments_join.mjs +38 -0
  52. package/lib/rules_inline/html_inline.mjs +50 -0
  53. package/lib/rules_inline/image.mjs +138 -0
  54. package/lib/rules_inline/link.mjs +139 -0
  55. package/lib/rules_inline/linkify.mjs +63 -0
  56. package/lib/rules_inline/newline.mjs +42 -0
  57. package/lib/rules_inline/state_inline.mjs +123 -0
  58. package/lib/rules_inline/strikethrough.mjs +127 -0
  59. package/lib/rules_inline/text.mjs +86 -0
  60. package/lib/token.mjs +191 -0
  61. package/package.json +109 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin.
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # @depup/markdown-it
2
+
3
+ > Dependency-bumped version of [markdown-it](https://www.npmjs.com/package/markdown-it)
4
+
5
+ Generated by [DepUp](https://github.com/depup/npm) -- all production
6
+ dependencies bumped to latest versions.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install @depup/markdown-it
12
+ ```
13
+
14
+ | Field | Value |
15
+ |-------|-------|
16
+ | Original | [markdown-it](https://www.npmjs.com/package/markdown-it) @ 14.1.1 |
17
+ | Processed | 2026-03-17 |
18
+ | Smoke test | passed |
19
+ | Deps updated | 1 |
20
+
21
+ ## Dependency Changes
22
+
23
+ | Dependency | From | To |
24
+ |------------|------|-----|
25
+ | entities | ^4.4.0 | ^8.0.0 |
26
+
27
+ ---
28
+
29
+ Source: https://github.com/depup/npm | Original: https://www.npmjs.com/package/markdown-it
30
+
31
+ License inherited from the original package.
@@ -0,0 +1,107 @@
1
+ #!/usr/bin/env node
2
+ /* eslint no-console:0 */
3
+
4
+ import fs from 'node:fs'
5
+ import argparse from 'argparse'
6
+ import markdownit from '../index.mjs'
7
+
8
+ const cli = new argparse.ArgumentParser({
9
+ prog: 'markdown-it',
10
+ add_help: true
11
+ })
12
+
13
+ cli.add_argument('-v', '--version', {
14
+ action: 'version',
15
+ version: JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url))).version
16
+ })
17
+
18
+ cli.add_argument('--no-html', {
19
+ help: 'Disable embedded HTML',
20
+ action: 'store_true'
21
+ })
22
+
23
+ cli.add_argument('-l', '--linkify', {
24
+ help: 'Autolink text',
25
+ action: 'store_true'
26
+ })
27
+
28
+ cli.add_argument('-t', '--typographer', {
29
+ help: 'Enable smartquotes and other typographic replacements',
30
+ action: 'store_true'
31
+ })
32
+
33
+ cli.add_argument('--trace', {
34
+ help: 'Show stack trace on error',
35
+ action: 'store_true'
36
+ })
37
+
38
+ cli.add_argument('file', {
39
+ help: 'File to read',
40
+ nargs: '?',
41
+ default: '-'
42
+ })
43
+
44
+ cli.add_argument('-o', '--output', {
45
+ help: 'File to write',
46
+ default: '-'
47
+ })
48
+
49
+ const options = cli.parse_args()
50
+
51
+ function readFile (filename, encoding, callback) {
52
+ if (options.file === '-') {
53
+ // read from stdin
54
+ const chunks = []
55
+
56
+ process.stdin.on('data', function (chunk) { chunks.push(chunk) })
57
+
58
+ process.stdin.on('end', function () {
59
+ return callback(null, Buffer.concat(chunks).toString(encoding))
60
+ })
61
+ } else {
62
+ fs.readFile(filename, encoding, callback)
63
+ }
64
+ }
65
+
66
+ readFile(options.file, 'utf8', function (err, input) {
67
+ let output
68
+
69
+ if (err) {
70
+ if (err.code === 'ENOENT') {
71
+ console.error('File not found: ' + options.file)
72
+ process.exit(2)
73
+ }
74
+
75
+ console.error(
76
+ (options.trace && err.stack) ||
77
+ err.message ||
78
+ String(err))
79
+
80
+ process.exit(1)
81
+ }
82
+
83
+ const md = markdownit({
84
+ html: !options.no_html,
85
+ xhtmlOut: false,
86
+ typographer: options.typographer,
87
+ linkify: options.linkify
88
+ })
89
+
90
+ try {
91
+ output = md.render(input)
92
+ } catch (e) {
93
+ console.error(
94
+ (options.trace && e.stack) ||
95
+ e.message ||
96
+ String(e))
97
+
98
+ process.exit(1)
99
+ }
100
+
101
+ if (options.output === '-') {
102
+ // write to stdout
103
+ process.stdout.write(output)
104
+ } else {
105
+ fs.writeFileSync(options.output, output)
106
+ }
107
+ })
package/changes.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "bumped": {
3
+ "entities": {
4
+ "from": "^4.4.0",
5
+ "to": "^8.0.0"
6
+ }
7
+ },
8
+ "timestamp": "2026-03-17T12:28:47.423Z",
9
+ "totalUpdated": 1
10
+ }