@mdit-vue/plugin-sfc
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -6,2 +6,6 @@ # Change Log | ||
# [0.4.0](https://github.com/mdit-vue/mdit-vue/compare/v0.3.1...v0.4.0) (2022-07-02) | ||
**Note:** Version bump only for package @mdit-vue/plugin-sfc | ||
# [0.3.0](https://github.com/mdit-vue/mdit-vue/compare/v0.2.0...v0.3.0) (2022-06-25) | ||
@@ -8,0 +12,0 @@ |
@@ -9,2 +9,4 @@ import { PluginWithOptions } from 'markdown-it'; | ||
* Custom blocks to be extracted | ||
* | ||
* @default [] | ||
*/ | ||
@@ -11,0 +13,0 @@ customBlocks?: string[]; |
{ | ||
"name": "@mdit-vue/plugin-sfc", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "A markdown-it plugin to help transforming markdown tu vue sfc", | ||
@@ -36,3 +36,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@mdit-vue/shared": "0.3.0", | ||
"@mdit-vue/shared": "0.4.0", | ||
"@types/markdown-it": "^12.2.3", | ||
@@ -44,3 +44,3 @@ "markdown-it": "^13.0.1" | ||
"unbuild": "^0.7.4", | ||
"vitest": "^0.15.2" | ||
"vitest": "^0.16.0" | ||
}, | ||
@@ -50,3 +50,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "bcbfd4705d747ee71d6c7c32f8be6155261e9c90" | ||
"gitHead": "744887e6f4733af8da2045625e72a476947cfc25" | ||
} |
# @mdit-vue/plugin-sfc | ||
[![npm](https://badgen.net/npm/v/@mdit-vue/plugin-sfc)](https://www.npmjs.com/package/@mdit-vue/plugin-sfc) | ||
[![license](https://badgen.net/github/license/mdit-vue/mdit-vue)](https://github.com/mdit-vue/mdit-vue/blob/main/LICENSE) | ||
@@ -5,0 +6,0 @@ A [markdown-it](https://github.com/markdown-it/markdown-it) plugin to help transforming markdown to [Vue SFC](https://vuejs.org/guide/scaling-up/sfc.html). |
@@ -30,7 +30,7 @@ import type { MarkdownItEnv } from '@mdit-vue/shared'; | ||
const content = tokens[idx].content; | ||
const extractedSfcBlocks = env.sfcBlocks || (env.sfcBlocks = []); | ||
// extract sfc blocks to env and do not render them | ||
if (sfcBlocksRegexp.test(content.trim())) { | ||
extractedSfcBlocks.push(content); | ||
env.sfcBlocks ??= []; | ||
env.sfcBlocks.push(content); | ||
return ''; | ||
@@ -37,0 +37,0 @@ } |
@@ -7,2 +7,4 @@ /** | ||
* Custom blocks to be extracted | ||
* | ||
* @default [] | ||
*/ | ||
@@ -9,0 +11,0 @@ customBlocks?: string[]; |
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
9450
169
60
+ Added@mdit-vue/shared@0.4.0(transitive)
- Removed@mdit-vue/shared@0.3.0(transitive)
Updated@mdit-vue/shared@0.4.0