rehype-image-caption 2.1.11 → 2.1.12
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/dist/index.js +1 -4
- package/package.json +10 -13
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// oxlint-disable-next-line import-x/no-unassigned-import
|
|
2
2
|
import "mdast-util-mdx-jsx";
|
|
3
3
|
import { isElement } from "hast-util-is-element";
|
|
4
4
|
import { visit } from "unist-util-visit";
|
|
@@ -57,15 +57,12 @@ const ImageChildCounts = {
|
|
|
57
57
|
* </figure>
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
|
-
// eslint-disable-next-line max-lines-per-function
|
|
61
60
|
const rehypeImageCaption = (options = { wrapImagesWithoutCaptions: true }) => {
|
|
62
61
|
/**
|
|
63
62
|
* Transformer
|
|
64
63
|
* @param tree Root node
|
|
65
64
|
*/
|
|
66
|
-
// eslint-disable-next-line max-lines-per-function
|
|
67
65
|
const transformer = (tree) => {
|
|
68
|
-
// eslint-disable-next-line max-lines-per-function, max-statements
|
|
69
66
|
visit(tree, "element", (node) => {
|
|
70
67
|
const [firstChild] = node.children;
|
|
71
68
|
if (!firstChild)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rehype-image-caption",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.12",
|
|
4
4
|
"description": "rehype plugin to set captions for images in addition to alt text.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"provenance": true
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"version": "npm run build && git add .",
|
|
18
18
|
"format": "prettier ./src/ --write",
|
|
19
19
|
"format:check": "prettier ./src/ --check",
|
|
20
|
-
"lint": "
|
|
20
|
+
"lint": "oxlint ./src",
|
|
21
21
|
"ci:version": "changeset version && npm run version",
|
|
22
22
|
"ci:publish": "npm run build && changeset publish"
|
|
23
23
|
},
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://github.com/Robot-Inventor/rehype-image-caption#readme",
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@changesets/changelog-github": "^1.0.
|
|
40
|
-
"@changesets/cli": "^3.0.
|
|
41
|
-
"@robot-inventor/
|
|
42
|
-
"@robot-inventor/tsconfig-base": "^7.
|
|
43
|
-
"
|
|
44
|
-
"prettier": "^3.9.
|
|
39
|
+
"@changesets/changelog-github": "^1.0.1",
|
|
40
|
+
"@changesets/cli": "^3.0.3",
|
|
41
|
+
"@robot-inventor/oxlint-config": "^0.4.0",
|
|
42
|
+
"@robot-inventor/tsconfig-base": "^7.2.0",
|
|
43
|
+
"oxlint": "^1.85.0",
|
|
44
|
+
"prettier": "^3.9.8",
|
|
45
45
|
"rehype-stringify": "^10.0.1",
|
|
46
46
|
"remark-breaks": "^4.0.0",
|
|
47
47
|
"remark-parse": "^11.0.0",
|
|
48
48
|
"remark-rehype": "^11.1.2",
|
|
49
|
-
"typescript": "^
|
|
50
|
-
"vitest": "^
|
|
49
|
+
"typescript": "^7.0.2",
|
|
50
|
+
"vitest": "^5.0.1"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"hast-util-is-element": "^3.0.0",
|
|
@@ -55,8 +55,5 @@
|
|
|
55
55
|
"rehype": "^13.0.2",
|
|
56
56
|
"unified": "^11.0.5",
|
|
57
57
|
"unist-util-visit": "^5.1.0"
|
|
58
|
-
},
|
|
59
|
-
"overrides": {
|
|
60
|
-
"zod-validation-error": "^5.0.0"
|
|
61
58
|
}
|
|
62
59
|
}
|