mirror of
https://github.com/withastro/astro.git
synced 2025-01-27 22:19:04 -05:00
a31bbd7ff8
* fix(markdown): don’t generate mdast html nodes `html` nodes from mdast are converted to `raw` hast nodes. These nodes are then not processed by proper rehype plugins. Typically if a remark plugin generates `html` nodes, this indicates it should have actually been a rehype plugin. This changes the remark plugins that generate `html` nodes into rehype nodes. These were `remarkPrism` and `remarkShiki`. Closes #9909 * Apply suggestions from code review * refactor(mdx): move user defined rehype plugins after syntax highlighting * fix(mdx): fix issue in mdx rehype plugin ordering * docs: explain why html/raw nodes are avoided in changeset This also includes some hints on what users could do to upgrade of they rely on these nodes. * Fix MDX rehype plugin ordering * refactor(remark): restore remarkPrism and remarkShiki They aren’t used anymore, but removing would be a breaking change. * chore: mark deprecated * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/thirty-beds-smoke.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
70 lines
1.9 KiB
JSON
70 lines
1.9 KiB
JSON
{
|
|
"name": "@astrojs/markdown-remark",
|
|
"version": "4.2.1",
|
|
"type": "module",
|
|
"author": "withastro",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/withastro/astro.git",
|
|
"directory": "packages/markdown/remark"
|
|
},
|
|
"bugs": "https://github.com/withastro/astro/issues",
|
|
"homepage": "https://astro.build",
|
|
"main": "./dist/index.js",
|
|
"exports": {
|
|
".": "./dist/index.js",
|
|
"./dist/internal.js": "./dist/internal.js"
|
|
},
|
|
"imports": {
|
|
"#import-plugin": {
|
|
"browser": "./dist/import-plugin-browser.js",
|
|
"default": "./dist/import-plugin-default.js"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"prepublish": "pnpm build",
|
|
"build": "astro-scripts build \"src/**/*.ts\" && tsc -p tsconfig.json",
|
|
"build:ci": "astro-scripts build \"src/**/*.ts\"",
|
|
"postbuild": "astro-scripts copy \"src/**/*.js\"",
|
|
"dev": "astro-scripts dev \"src/**/*.ts\"",
|
|
"test": "astro-scripts test \"test/**/*.test.js\""
|
|
},
|
|
"dependencies": {
|
|
"@astrojs/prism": "^3.0.0",
|
|
"github-slugger": "^2.0.0",
|
|
"hast-util-from-html": "^2.0.0",
|
|
"hast-util-to-text": "^4.0.0",
|
|
"import-meta-resolve": "^4.0.0",
|
|
"mdast-util-definitions": "^6.0.0",
|
|
"rehype-raw": "^7.0.0",
|
|
"rehype-stringify": "^10.0.0",
|
|
"remark-gfm": "^4.0.0",
|
|
"remark-parse": "^11.0.0",
|
|
"remark-rehype": "^11.0.0",
|
|
"remark-smartypants": "^2.0.0",
|
|
"shiki": "^1.1.2",
|
|
"unified": "^11.0.4",
|
|
"unist-util-remove-position": "^5.0.0",
|
|
"unist-util-visit": "^5.0.0",
|
|
"unist-util-visit-parents": "^6.0.0",
|
|
"vfile": "^6.0.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/chai": "^4.3.10",
|
|
"@types/estree": "^1.0.5",
|
|
"@types/hast": "^3.0.3",
|
|
"@types/mdast": "^4.0.3",
|
|
"@types/mocha": "^10.0.4",
|
|
"@types/unist": "^3.0.2",
|
|
"astro-scripts": "workspace:*",
|
|
"esbuild": "^0.19.6",
|
|
"mdast-util-mdx-expression": "^2.0.0"
|
|
},
|
|
"publishConfig": {
|
|
"provenance": true
|
|
}
|
|
}
|