Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vuepress/markdown

Package Overview
Dependencies
Maintainers
0
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vuepress/markdown - npm Package Compare versions

Comparing version 2.0.0-rc.15 to 2.0.0-rc.16

20

dist/index.d.ts

@@ -92,15 +92,15 @@ import { SfcPluginOptions } from '@mdit-vue/plugin-sfc';

interface MarkdownOptions extends Options$1 {
anchor?: false | AnchorPluginOptions;
assets?: false | AssetsPluginOptions;
anchor?: AnchorPluginOptions | false;
assets?: AssetsPluginOptions | false;
component?: false;
emoji?: false | EmojiPluginOptions;
frontmatter?: false | FrontmatterPluginOptions;
headers?: false | HeadersPluginOptions;
emoji?: EmojiPluginOptions | false;
frontmatter?: FrontmatterPluginOptions | false;
headers?: HeadersPluginOptions | false;
title?: false;
importCode?: false | ImportCodePluginOptions;
links?: false | LinksPluginOptions;
sfc?: false | SfcPluginOptions;
importCode?: ImportCodePluginOptions | false;
links?: LinksPluginOptions | false;
sfc?: SfcPluginOptions | false;
slugify?: MarkdownSlugifyFunction;
toc?: false | TocPluginOptions;
vPre?: false | VPrePluginOptions;
toc?: TocPluginOptions | false;
vPre?: VPrePluginOptions | false;
/**

@@ -107,0 +107,0 @@ * @deprecated This feature has been removed. Please use `@vuepress/plugin-prismjs` or `@vuepress/plugin-shiki` instead.

@@ -21,3 +21,3 @@ // src/markdown.ts

// src/plugins/anchorPlugin.ts
import { default as anchorPlugin } from "markdown-it-anchor";
import anchorPlugin from "markdown-it-anchor";

@@ -85,3 +85,3 @@ // src/plugins/assetsPlugin/resolveLink.ts

/^([^ ]*?)([ \n].*)?$/,
(_2, url, descriptor = "") => `${resolveLink(url.trim(), {
(__, url, descriptor = "") => `${resolveLink(url.trim(), {
env,

@@ -185,5 +185,8 @@ absolutePathPrependBase,

);
md.renderer.rules.import_code = (tokens, idx, options2, env, slf) => {
md.renderer.rules.import_code = (tokens, idx, opts, env, slf) => {
const token = tokens[idx];
const { importFilePath, importCode } = resolveImportCode(token.meta, env);
const { importFilePath, importCode } = resolveImportCode(
token.meta,
env
);
token.content = importCode;

@@ -194,3 +197,3 @@ if (importFilePath) {

}
return md.renderer.rules.fence(tokens, idx, options2, env, slf);
return md.renderer.rules.fence(tokens, idx, opts, env, slf);
};

@@ -216,14 +219,12 @@ };

}
} else if (filePathRelative) {
relativePath = path4.join(
// file path may contain non-ASCII characters
path4.dirname(encodeURI(filePathRelative)),
rawPath
);
absolutePath = path4.join(base, relativePath);
} else {
if (filePathRelative) {
relativePath = path4.join(
// file path may contain non-ASCII characters
path4.dirname(encodeURI(filePathRelative)),
rawPath
);
absolutePath = path4.join(base, relativePath);
} else {
relativePath = rawPath.replace(/^(?:\.\/)?(.*)$/, "$1");
absolutePath = null;
}
relativePath = rawPath.replace(/^(?:\.\/)?(.*)$/, "$1");
absolutePath = null;
}

@@ -255,5 +256,5 @@ return {

if (isLinkExternal(hrefLink, base)) {
Object.entries(externalAttrs).forEach(
([key, val]) => token.attrSet(key, val)
);
Object.entries(externalAttrs).forEach(([key, val]) => {
token.attrSet(key, val);
});
return;

@@ -293,7 +294,7 @@ }

};
md.renderer.rules.link_open = (tokens, idx, options2, env, self) => {
md.renderer.rules.link_open = (tokens, idx, opts, env, self) => {
handleLinkOpen(tokens, idx, env);
return self.renderToken(tokens, idx, options2);
return self.renderToken(tokens, idx, opts);
};
md.renderer.rules.link_close = (tokens, idx, options2, _env, self) => {
md.renderer.rules.link_close = (tokens, idx, opts, _env, self) => {
if (hasOpenInternalLink) {

@@ -303,3 +304,3 @@ hasOpenInternalLink = false;

}
return self.renderToken(tokens, idx, options2);
return self.renderToken(tokens, idx, opts);
};

@@ -345,2 +346,3 @@ };

assets,
// eslint-disable-next-line @typescript-eslint/no-deprecated
code,

@@ -383,3 +385,3 @@ vPre,

`\`markdown.code\` option has been removed, please use '@vuepress/plugin-shiki' or '@vuepress/plugin-prismjs' instead.
See https://v2.vuepress.vuejs.org/reference/config.html#markdown-code`
See https://vuepress.vuejs.org/reference/config.html#markdown-code`
);

@@ -386,0 +388,0 @@ }

{
"name": "@vuepress/markdown",
"version": "2.0.0-rc.15",
"version": "2.0.0-rc.16",
"description": "Markdown package of VuePress",

@@ -41,7 +41,7 @@ "keywords": [

"markdown-it": "^14.1.0",
"markdown-it-anchor": "^9.0.1",
"markdown-it-anchor": "^9.2.0",
"markdown-it-emoji": "^3.0.0",
"mdurl": "^2.0.0",
"@vuepress/utils": "2.0.0-rc.15",
"@vuepress/shared": "2.0.0-rc.15"
"@vuepress/utils": "2.0.0-rc.16",
"@vuepress/shared": "2.0.0-rc.16"
},

@@ -48,0 +48,0 @@ "devDependencies": {

@@ -8,3 +8,3 @@ # @vuepress/markdown

https://v2.vuepress.vuejs.org
https://vuepress.vuejs.org

@@ -11,0 +11,0 @@ ## License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc