rehype-highlight-code-lines 1.1.2 → 1.1.4
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.
- package/LICENSE +1 -1
- package/README.md +15 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -15
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -135,7 +135,7 @@ Without `rehype-highlight-code-lines`, the lines of code wouldn't be in a `span`
|
|
|
135
135
|
|
|
136
136
|
## Usage in HTML attributes
|
|
137
137
|
|
|
138
|
-
**`rehype-highlight-code-lines`** runs on `<code>` elements with directives like `showLineNumbers` and range number in curly braces like `{2-4,
|
|
138
|
+
**`rehype-highlight-code-lines`** runs on `<code>` elements with directives like `showLineNumbers` and range number in curly braces like `{2-4,8}`. That directives can be passed as a word in markdown (` ```ts showLineNumbers {2-4,8} `) or as a class and attribute in HTML (`<code class="language-ts show-line-numbers" data-highlight-lines="2-4,8">`).
|
|
139
139
|
|
|
140
140
|
The inverse occurs when the option `showLineNumbers` is true. All `<code>` are processed and numbered. Then (` ```ts noLineNumbers `), or as a class (`<code class="language-ts no-line-numbers">`) can be used to prevent processing.
|
|
141
141
|
|
|
@@ -429,6 +429,10 @@ I like to contribute the Unified / Remark / MDX ecosystem, so I recommend you to
|
|
|
429
429
|
– Rehype plugin to add language information as a property to `pre` element
|
|
430
430
|
- [`rehype-highlight-code-lines`](https://www.npmjs.com/package/rehype-highlight-code-lines)
|
|
431
431
|
– Rehype plugin to add line numbers to code blocks and allow highlighting of desired code lines
|
|
432
|
+
- [`rehype-code-meta`](https://www.npmjs.com/package/rehype-code-meta)
|
|
433
|
+
– Rehype plugin to copy `code.data.meta` to `code.properties.metastring`
|
|
434
|
+
- [`rehype-image-toolkit`](https://www.npmjs.com/package/rehype-image-toolkit)
|
|
435
|
+
– Rehype plugin to enhance Markdown image syntax `![]()` and Markdown/MDX media elements (`<img>`, `<audio>`, `<video>`) by auto-linking bracketed or parenthesized image URLs, wrapping them in `<figure>` with optional captions, unwrapping images/videos/audio from paragraph, parsing directives in title for styling and adding attributes, and dynamically converting images into `<video>` or `<audio>` elements based on file extension.
|
|
432
436
|
|
|
433
437
|
### My Recma Plugins
|
|
434
438
|
|
|
@@ -436,6 +440,16 @@ I like to contribute the Unified / Remark / MDX ecosystem, so I recommend you to
|
|
|
436
440
|
– Recma plugin to set the default value `() => null` for the Components in MDX in case of missing or not provided so as not to throw an error
|
|
437
441
|
- [`recma-mdx-change-props`](https://www.npmjs.com/package/recma-mdx-change-props)
|
|
438
442
|
– Recma plugin to change the `props` parameter into the `_props` in the `function _createMdxContent(props) {/* */}` in the compiled source in order to be able to use `{props.foo}` like expressions. It is useful for the `next-mdx-remote` or `next-mdx-remote-client` users in `nextjs` applications.
|
|
443
|
+
- [`recma-mdx-change-imports`](https://www.npmjs.com/package/recma-mdx-change-imports)
|
|
444
|
+
– Recma plugin to convert import declarations for assets and media with relative links into variable declarations with string URLs, enabling direct asset URL resolution in compiled MDX.
|
|
445
|
+
- [`recma-mdx-import-media`](https://www.npmjs.com/package/recma-mdx-import-media)
|
|
446
|
+
– Recma plugin to turn media relative paths into import declarations for both markdown and html syntax in MDX.
|
|
447
|
+
- [`recma-mdx-import-react`](https://www.npmjs.com/package/recma-mdx-import-react)
|
|
448
|
+
– Recma plugin to ensure getting `React` instance from the arguments and to make the runtime props `{React, jsx, jsxs, jsxDev, Fragment}` is available in the dynamically imported components in the compiled source of MDX.
|
|
449
|
+
- [`recma-mdx-html-override`](https://www.npmjs.com/package/recma-mdx-html-override)
|
|
450
|
+
– Recma plugin to allow selected raw HTML elements to be overridden via MDX components.
|
|
451
|
+
- [`recma-mdx-interpolate`](https://www.npmjs.com/package/recma-mdx-interpolate)
|
|
452
|
+
– Recma plugin to enable interpolation of identifiers wrapped in curly braces within the `alt`, `src`, `href`, and `title` attributes of markdown link and image syntax in MDX.
|
|
439
453
|
|
|
440
454
|
## License
|
|
441
455
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../../src/index.ts"],"version":"5.
|
|
1
|
+
{"root":["../../src/index.ts"],"version":"5.8.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rehype-highlight-code-lines",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Rehype plugin to add line numbers to code blocks and allow highlighting of desired code lines",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/esm/index.js",
|
|
@@ -56,32 +56,32 @@
|
|
|
56
56
|
"url": "https://github.com/ipikuka/rehype-highlight-code-lines/issues"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@eslint/js": "^9.
|
|
59
|
+
"@eslint/js": "^9.26.0",
|
|
60
60
|
"@types/dedent": "^0.7.2",
|
|
61
|
-
"@types/node": "^22.
|
|
62
|
-
"@vitest/coverage-v8": "^3.
|
|
63
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
64
|
-
"dedent": "^1.
|
|
65
|
-
"eslint": "^9.
|
|
66
|
-
"eslint-config-prettier": "^10.
|
|
67
|
-
"eslint-plugin-prettier": "^5.
|
|
68
|
-
"prettier": "^3.5.
|
|
61
|
+
"@types/node": "^22.15.14",
|
|
62
|
+
"@vitest/coverage-v8": "^3.1.3",
|
|
63
|
+
"@vitest/eslint-plugin": "^1.1.44",
|
|
64
|
+
"dedent": "^1.6.0",
|
|
65
|
+
"eslint": "^9.26.0",
|
|
66
|
+
"eslint-config-prettier": "^10.1.2",
|
|
67
|
+
"eslint-plugin-prettier": "^5.4.0",
|
|
68
|
+
"prettier": "^3.5.3",
|
|
69
69
|
"rehype": "^13.0.2",
|
|
70
70
|
"rehype-highlight": "^7.0.2",
|
|
71
71
|
"rehype-parse": "^9.0.1",
|
|
72
72
|
"rehype-raw": "^7.0.0",
|
|
73
73
|
"rehype-stringify": "^10.0.1",
|
|
74
|
-
"remark-gfm": "^4.0.
|
|
74
|
+
"remark-gfm": "^4.0.1",
|
|
75
75
|
"remark-parse": "^11.0.0",
|
|
76
|
-
"remark-rehype": "^11.1.
|
|
76
|
+
"remark-rehype": "^11.1.2",
|
|
77
77
|
"rimraf": "^5.0.10",
|
|
78
78
|
"type-coverage": "^2.29.7",
|
|
79
|
-
"typescript": "^5.
|
|
80
|
-
"typescript-eslint": "^8.
|
|
79
|
+
"typescript": "^5.8.3",
|
|
80
|
+
"typescript-eslint": "^8.32.0",
|
|
81
81
|
"unified": "^11.0.5",
|
|
82
82
|
"unist-util-remove-position": "^5.0.0",
|
|
83
83
|
"vfile": "^6.0.3",
|
|
84
|
-
"vitest": "^3.
|
|
84
|
+
"vitest": "^3.1.3"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
87
|
"@types/hast": "^3.0.4",
|