diff --git a/lib/ast-to-react.js b/lib/ast-to-react.js index ef02544e..d32c06b0 100644 --- a/lib/ast-to-react.js +++ b/lib/ast-to-react.js @@ -16,7 +16,7 @@ * @typedef {import('hast').Root} Root * @typedef {import('hast').Text} Text * @typedef {import('hast').Comment} Comment - * @typedef {import('hast').DocType} Doctype + * @typedef {import('hast').Doctype} Doctype * @typedef {import('property-information').Info} Info * @typedef {import('property-information').Schema} Schema * @typedef {import('./complex-types.js').ReactMarkdownProps} ReactMarkdownProps diff --git a/package.json b/package.json index 150a2367..6f0526c5 100644 --- a/package.json +++ b/package.json @@ -79,21 +79,21 @@ "react-markdown.min.js" ], "dependencies": { - "@types/hast": "^2.0.0", + "@types/hast": "^3.0.0", "@types/prop-types": "^15.0.0", - "@types/unist": "^2.0.0", + "@types/unist": "^3.0.0", "comma-separated-tokens": "^2.0.0", - "hast-util-whitespace": "^2.0.0", + "hast-util-whitespace": "^3.0.0", "prop-types": "^15.0.0", "property-information": "^6.0.0", "react-is": "^18.0.0", - "remark-parse": "^10.0.0", - "remark-rehype": "^10.0.0", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.0.0", "space-separated-tokens": "^2.0.0", "style-to-object": "^0.4.0", - "unified": "^10.0.0", - "unist-util-visit": "^4.0.0", - "vfile": "^5.0.0" + "unified": "^11.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" }, "peerDependencies": { "@types/react": ">=16", @@ -114,11 +114,11 @@ "prettier": "^3.0.0", "react": "^18.0.0", "react-dom": "^18.0.0", - "rehype-raw": "^6.0.0", + "rehype-raw": "^7.0.0", "remark-cli": "^11.0.0", - "remark-gfm": "^3.0.0", + "remark-gfm": "^4.0.0", "remark-preset-wooorm": "^9.0.0", - "remark-toc": "^8.0.0", + "remark-toc": "^9.0.0", "type-coverage": "^2.0.0", "typescript": "^5.0.0", "xo": "^0.56.0" @@ -143,7 +143,7 @@ "plugins": [ "remark-preset-wooorm", [ - "remark-gfm", + "./node_modules/remark-preset-wooorm/node_modules/remark-gfm/index.js", { "tablePipeAlign": false } diff --git a/test/fixtures/runthrough.html b/test/fixtures/runthrough.html index 8dd0c334..824af77d 100644 --- a/test/fixtures/runthrough.html +++ b/test/fixtures/runthrough.html @@ -152,10 +152,10 @@
Some characters, like æ, & and similar should be handled properly.
Does anyone actually like the fact that you can embed HTML in markdown?
-, as long as it doesn't contain any attributes. If you + +We used to have a known bug where inline HTML wasn't handled well. You can do basic tags like
+code
, as long as it doesn't contain any attributes. If you
have weird ordering on your tags, it won't work either. It does support nested
-tags, however. And with the rehype-raw
plugin, it can now properly handle HTML! Which is pretty sweet.
rehype-raw
plugin, it can now properly handle HTML! Which is pretty sweet.
Cool, eh?
\ No newline at end of file diff --git a/test/fixtures/runthrough.md b/test/fixtures/runthrough.md index c643ab4c..7fec387f 100644 --- a/test/fixtures/runthrough.md +++ b/test/fixtures/runthrough.md @@ -159,7 +159,7 @@ Does anyone actually like the fact that you can embed HTML in markdown? src="https://foo.bar/" width="640" height="480" -/> +> We used to have a known bug where inline HTML wasn't handled well. You can do basic tags likecode
, as long as it doesn't contain any attributes. If you
diff --git a/test/test.jsx b/test/test.jsx
index ed0418f3..b21bfb7a 100644
--- a/test/test.jsx
+++ b/test/test.jsx
@@ -835,7 +835,7 @@ test('should render footnote with custom options', () => {
remarkRehypeOptions={{clobberPrefix: 'main-'}}
/>
),
- 'This is a statement1 with a citation.
\nThis is a footnote for the citation. ↩
\nThis is a statement1 with a citation.
\nThis is a footnote for the citation. ↩
\n