@vuepress/markdown
Advanced tools
Comparing version 2.0.0-beta.43 to 2.0.0-beta.44
@@ -63,3 +63,3 @@ "use strict"; | ||
const lineNumbersCode = lines | ||
.map((_, index) => `<span class="line-number">${index + 1}</span><br>`) | ||
.map(() => `<div class="line-number"></div>`) | ||
.join(''); | ||
@@ -66,0 +66,0 @@ result = `${result}<div class="line-numbers" aria-hidden="true">${lineNumbersCode}</div>`; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolvePaths = void 0; | ||
const shared_1 = require("@vuepress/shared"); | ||
const utils_1 = require("@vuepress/utils"); | ||
@@ -9,8 +10,18 @@ /** | ||
const resolvePaths = (rawPath, base, filePathRelative) => { | ||
let absolutePath; | ||
let relativePath; | ||
let absolutePath; | ||
if (rawPath.startsWith('/')) { | ||
// if raw path is absolute | ||
absolutePath = rawPath; | ||
relativePath = utils_1.path.relative(base, absolutePath); | ||
if (rawPath.endsWith('.md')) { | ||
// if raw path is a link to markdown file | ||
// prepend `base` to the link | ||
absolutePath = utils_1.path.join(base, rawPath); | ||
relativePath = (0, shared_1.removeLeadingSlash)(rawPath); | ||
} | ||
else { | ||
// if raw path is a link to other kind of file | ||
// keep the link as is | ||
absolutePath = rawPath; | ||
relativePath = utils_1.path.relative(base, absolutePath); | ||
} | ||
} | ||
@@ -17,0 +28,0 @@ else { |
{ | ||
"name": "@vuepress/markdown", | ||
"version": "2.0.0-beta.43", | ||
"version": "2.0.0-beta.44", | ||
"description": "Markdown package of VuePress", | ||
@@ -26,7 +26,7 @@ "keywords": [ | ||
"@types/markdown-it": "^12.2.3", | ||
"@vuepress/shared": "2.0.0-beta.43", | ||
"@vuepress/utils": "2.0.0-beta.43", | ||
"markdown-it": "^13.0.0", | ||
"markdown-it-anchor": "^8.4.1", | ||
"markdown-it-emoji": "^2.0.0", | ||
"@vuepress/shared": "2.0.0-beta.44", | ||
"@vuepress/utils": "2.0.0-beta.44", | ||
"markdown-it": "^13.0.1", | ||
"markdown-it-anchor": "^8.6.3", | ||
"markdown-it-emoji": "^2.0.2", | ||
"mdurl": "^1.0.1" | ||
@@ -33,0 +33,0 @@ }, |
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
73035
1976
+ Added@vue/shared@3.5.6(transitive)
+ Added@vuepress/shared@2.0.0-beta.44(transitive)
+ Added@vuepress/utils@2.0.0-beta.44(transitive)
- Removed@vue/shared@3.5.5(transitive)
- Removed@vuepress/shared@2.0.0-beta.43(transitive)
- Removed@vuepress/utils@2.0.0-beta.43(transitive)
Updatedmarkdown-it@^13.0.1
Updatedmarkdown-it-anchor@^8.6.3
Updatedmarkdown-it-emoji@^2.0.2