Socket
Socket
Sign inDemoInstall

@vuepress/markdown

Package Overview
Dependencies
Maintainers
6
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-beta.61 to 2.0.0-beta.62

24

./dist/index.js

@@ -31,5 +31,12 @@ var __defProp = Object.defineProperty;

import { decode } from "mdurl";
var resolveLink = (link, relativePathPrefix, env) => {
var resolveLink = (link, relativePathPrefix, env, strict = false) => {
let resolvedLink = decode(link);
if (/^\.{1,2}\//.test(link) && env.filePathRelative) {
const isRelativePath = strict ? (
// in strict mode, only link that starts with `./` or `../` is considered as relative path
/^\.{1,2}\//.test(link)
) : (
// in non-strict mode, link that does not start with `/` and does not have protocol is considered as relative path
!link.startsWith("/") && !/[A-z]+:\/\//.test(link)
);
if (isRelativePath && env.filePathRelative) {
resolvedLink = `${relativePathPrefix}/${path.join(

@@ -60,3 +67,4 @@ path.dirname(env.filePathRelative),

relativePathPrefix,
env
env,
true
)}${quote}`

@@ -71,3 +79,4 @@ ).replace(

relativePathPrefix,
env
env,
true
)}${descriptor.replace(/[ \n]+/g, " ").trimEnd()}`

@@ -364,4 +373,4 @@ )

if (importFilePath) {
const importedFiles = env.importedFiles || (env.importedFiles = []);
importedFiles.push(importFilePath);
;
(env.importedFiles ?? (env.importedFiles = [])).push(importFilePath);
}

@@ -452,4 +461,3 @@ return md.renderer.rules.fence(tokens, idx, options2, env, slf);

hrefAttr[1] = `${normalizedPath}${rawHash}`;
const links = env.links || (env.links = []);
links.push({
(env.links ?? (env.links = [])).push({
raw: hrefLink,

@@ -456,0 +464,0 @@ relative: relativePath,

@@ -31,5 +31,12 @@ var __defProp = Object.defineProperty;

import { decode } from "mdurl";
var resolveLink = (link, relativePathPrefix, env) => {
var resolveLink = (link, relativePathPrefix, env, strict = false) => {
let resolvedLink = decode(link);
if (/^\.{1,2}\//.test(link) && env.filePathRelative) {
const isRelativePath = strict ? (
// in strict mode, only link that starts with `./` or `../` is considered as relative path
/^\.{1,2}\//.test(link)
) : (
// in non-strict mode, link that does not start with `/` and does not have protocol is considered as relative path
!link.startsWith("/") && !/[A-z]+:\/\//.test(link)
);
if (isRelativePath && env.filePathRelative) {
resolvedLink = `${relativePathPrefix}/${path.join(

@@ -60,3 +67,4 @@ path.dirname(env.filePathRelative),

relativePathPrefix,
env
env,
true
)}${quote}`

@@ -71,3 +79,4 @@ ).replace(

relativePathPrefix,
env
env,
true
)}${descriptor.replace(/[ \n]+/g, " ").trimEnd()}`

@@ -364,4 +373,4 @@ )

if (importFilePath) {
const importedFiles = env.importedFiles || (env.importedFiles = []);
importedFiles.push(importFilePath);
;
(env.importedFiles ?? (env.importedFiles = [])).push(importFilePath);
}

@@ -452,4 +461,3 @@ return md.renderer.rules.fence(tokens, idx, options2, env, slf);

hrefAttr[1] = `${normalizedPath}${rawHash}`;
const links = env.links || (env.links = []);
links.push({
(env.links ?? (env.links = [])).push({
raw: hrefLink,

@@ -456,0 +464,0 @@ relative: relativePath,

{
"name": "@vuepress/markdown",
"version": "2.0.0-beta.61",
"version": "2.0.0-beta.62",
"description": "Markdown package of VuePress",

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

"mdurl": "^1.0.1",
"@vuepress/shared": "2.0.0-beta.61",
"@vuepress/utils": "2.0.0-beta.61"
"@vuepress/shared": "2.0.0-beta.62",
"@vuepress/utils": "2.0.0-beta.62"
},

@@ -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