unplugin-vue-markdown
Advanced tools
Comparing version 0.24.1 to 0.24.2
import { | ||
unpluginFactory | ||
} from "./chunk-7NCSN2L6.js"; | ||
} from "./chunk-QO3VKIYR.js"; | ||
@@ -5,0 +5,0 @@ // src/esbuild.ts |
import { | ||
src_default, | ||
unpluginFactory | ||
} from "./chunk-7NCSN2L6.js"; | ||
} from "./chunk-QO3VKIYR.js"; | ||
export { | ||
@@ -6,0 +6,0 @@ src_default as default, |
import { | ||
unpluginFactory | ||
} from "./chunk-7NCSN2L6.js"; | ||
} from "./chunk-QO3VKIYR.js"; | ||
@@ -5,0 +5,0 @@ // src/rollup.ts |
import { | ||
unpluginFactory | ||
} from "./chunk-7NCSN2L6.js"; | ||
} from "./chunk-QO3VKIYR.js"; | ||
@@ -5,0 +5,0 @@ // src/rspack.ts |
@@ -162,2 +162,6 @@ import MarkdownIt from 'markdown-it'; | ||
after?: (code: string, id: string) => string; | ||
/** | ||
* Return extra code to be injected into the `<script>` tag | ||
*/ | ||
extraScripts?: (frontmatter: Record<string, any>, id: string) => string[]; | ||
}; | ||
@@ -164,0 +168,0 @@ include?: FilterPattern; |
import { | ||
unpluginFactory | ||
} from "./chunk-7NCSN2L6.js"; | ||
} from "./chunk-QO3VKIYR.js"; | ||
@@ -5,0 +5,0 @@ // src/vite.ts |
import { | ||
unpluginFactory | ||
} from "./chunk-7NCSN2L6.js"; | ||
} from "./chunk-QO3VKIYR.js"; | ||
@@ -5,0 +5,0 @@ // src/webpack.ts |
{ | ||
"name": "unplugin-vue-markdown", | ||
"type": "module", | ||
"version": "0.24.1", | ||
"version": "0.24.2", | ||
"packageManager": "pnpm@8.6.12", | ||
@@ -6,0 +6,0 @@ "description": "Compile Markdown to Vue component", |
@@ -262,3 +262,3 @@ # unplugin-vue-markdown | ||
See the [/example](./example). | ||
See the [/examples](./examples). | ||
@@ -265,0 +265,0 @@ Or the pre-configured Markdown template [Vitesse](https://github.com/antfu/vitesse). |
@@ -106,6 +106,4 @@ import MarkdownIt from 'markdown-it' | ||
raw = raw.trimStart() | ||
raw = transforms.before?.(raw, id) ?? raw | ||
if (transforms.before) | ||
raw = transforms.before(raw, id) | ||
const env: MarkdownEnv = { id } | ||
@@ -140,4 +138,3 @@ let html = markdown.render(raw, env) | ||
if (transforms.after) | ||
html = transforms.after(html, id) | ||
html = transforms.after?.(html, id) ?? html | ||
@@ -195,2 +192,4 @@ if (options.escapeCodeTagInterpolation) { | ||
} | ||
scriptLines.push(...transforms.extraScripts?.(frontmatter, id) || []) | ||
} | ||
@@ -197,0 +196,0 @@ |
@@ -190,2 +190,6 @@ import type MarkdownIt from 'markdown-it' | ||
after?: (code: string, id: string) => string | ||
/** | ||
* Return extra code to be injected into the `<script>` tag | ||
*/ | ||
extraScripts?: (frontmatter: Record<string, any>, id: string) => string[] | ||
} | ||
@@ -192,0 +196,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101675
2093