Socket
Socket
Sign inDemoInstall

@vuepress/markdown

Package Overview
Dependencies
Maintainers
2
Versions
180
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.4 to 2.0.0-rc.5

8

dist/index.d.ts

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

*
* @default 'VPLink'
* @default 'RouteLink'
*/
internalTag?: 'a' | 'VPLink' | 'RouterLink';
internalTag?: 'a' | 'RouteLink' | 'RouterLink';
/**

@@ -110,4 +110,4 @@ * Additional attributes for external links

*
* - internal links: convert them into `<VPLink>`
* - external links: add extra attrs and external icon
* - internal links: convert `<a>` tag into internalTag
* - external links: add extra attrs
*/

@@ -114,0 +114,0 @@ declare const linksPlugin: PluginWithOptions<LinksPluginOptions>;

@@ -403,3 +403,3 @@ var __defProp = Object.defineProperty;

// src/plugins/linksPlugin/linksPlugin.ts
import { isLinkExternal } from "@vuepress/shared";
import { isLinkExternal, normalizeRoutePath } from "@vuepress/shared";

@@ -441,3 +441,3 @@ // src/plugins/linksPlugin/resolvePaths.ts

var linksPlugin = (md, options = {}) => {
const internalTag = options.internalTag || "VPLink";
const internalTag = options.internalTag || "RouteLink";
const externalAttrs = {

@@ -477,9 +477,15 @@ target: "_blank",

);
const normalizedPath = absolutePath.replace(new RegExp(`^${base}`), "/").replace(/(^|\/)(README|index).md$/i, "$1").replace(/\.md$/, ".html");
if (["RouterLink", "VPLink"].includes(internalTag)) {
if (["RouterLink", "RouteLink"].includes(internalTag)) {
token.tag = internalTag;
hrefAttr[0] = "to";
const normalizedPath = normalizeRoutePath(
absolutePath.replace(new RegExp(`^${base}`), "/")
);
hrefAttr[1] = `${normalizedPath}${rawHash}`;
hasOpenInternalLink = true;
} else {
const normalizedPath = normalizeRoutePath(absolutePath);
hrefAttr[1] = `${normalizedPath}${rawHash}`;
}
hrefAttr[1] = `${normalizedPath}${rawHash}`;
;
(env.links ??= []).push({

@@ -486,0 +492,0 @@ raw: hrefLink,

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

@@ -44,4 +44,4 @@ "keywords": [

"mdurl": "^2.0.0",
"@vuepress/shared": "2.0.0-rc.4",
"@vuepress/utils": "2.0.0-rc.4"
"@vuepress/shared": "2.0.0-rc.5",
"@vuepress/utils": "2.0.0-rc.5"
},

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

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