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 1.0.0-alpha.38 to 1.0.0-alpha.39

19

lib/link.js

@@ -5,2 +5,4 @@ // markdown-it plugin for:

const url = require('url')
const indexRE = /(^|.*\/)(index|readme).md(#?.*)$/i

@@ -13,2 +15,3 @@

md.renderer.rules.link_open = (tokens, idx, options, env, self) => {
const { relPath } = env
const token = tokens[idx]

@@ -30,3 +33,3 @@ const hrefIndex = token.attrIndex('href')

hasOpenRouterLink = true
tokens[idx] = toRouterLink(token, link)
tokens[idx] = toRouterLink(token, link, relPath)
}

@@ -37,3 +40,3 @@ }

function toRouterLink (token, link) {
function toRouterLink (token, link, relPath) {
link[0] = 'to'

@@ -46,2 +49,9 @@ let to = link[1]

// relative path usage.
if (!to.startsWith('/')) {
to = relPath
? url.resolve('/' + relPath, to)
: ensureBeginningDotSlash(to)
}
const indexMatch = to.match(indexRE)

@@ -57,7 +67,2 @@ if (indexMatch) {

// relative path usage.
if (!to.startsWith('/')) {
to = ensureBeginningDotSlash(to)
}
// markdown-it encodes the uri

@@ -64,0 +69,0 @@ link[1] = decodeURI(to)

{
"name": "@vuepress/markdown",
"version": "1.0.0-alpha.38",
"version": "1.0.0-alpha.39",
"description": "markdown for vuepress",

@@ -22,3 +22,3 @@ "main": "index.js",

"dependencies": {
"@vuepress/shared-utils": "^1.0.0-alpha.38",
"@vuepress/shared-utils": "^1.0.0-alpha.39",
"markdown-it": "^8.4.1",

@@ -44,3 +44,3 @@ "markdown-it-anchor": "^5.0.2",

"homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/markdown#readme",
"gitHead": "2e0da50150850bf27c95791c3cac4c05275a703d"
"gitHead": "170cf6e4b9d826c0692a9c14002d7b0dd5dd1cbe"
}
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