@vuepress/markdown
Advanced tools
Comparing version 2.0.0-beta.45 to 2.0.0-beta.46
@@ -24,3 +24,12 @@ "use strict"; | ||
// replace the original link with resolved link | ||
tokens[idx].content = tokens[idx].content.replace(/(<img\b.*?src=")([^"]*)(")/gs, (_, prefix, link, suffix) => `${prefix}${(0, resolveLink_1.resolveLink)(link, relativePathPrefix, env)}${suffix}`); | ||
tokens[idx].content = tokens[idx].content | ||
// handle src | ||
.replace(/(<img\b.*?src=")([^"]*)(")/gs, (_, prefix, src, suffix) => `${prefix}${(0, resolveLink_1.resolveLink)(src.trim(), relativePathPrefix, env)}${suffix}`) | ||
// handle srcset | ||
.replace(/(<img\b.*?srcset=")([^"]*)(")/gs, (_, prefix, srcset, suffix) => `${prefix}${srcset | ||
.split(',') | ||
.map((item) => item | ||
.trim() | ||
.replace(/^([^ ]*?)([ \n].*)?$/, (_, url, descriptor = '') => `${(0, resolveLink_1.resolveLink)(url.trim(), relativePathPrefix, env)}${descriptor.replace(/[ \n]+/g, ' ').trimEnd()}`)) | ||
.join(', ')}${suffix}`); | ||
return rawHtmlRule(tokens, idx, options, env, self); | ||
@@ -27,0 +36,0 @@ }; |
{ | ||
"name": "@vuepress/markdown", | ||
"version": "2.0.0-beta.45", | ||
"version": "2.0.0-beta.46", | ||
"description": "Markdown package of VuePress", | ||
@@ -26,6 +26,6 @@ "keywords": [ | ||
"@types/markdown-it": "^12.2.3", | ||
"@vuepress/shared": "2.0.0-beta.45", | ||
"@vuepress/utils": "2.0.0-beta.45", | ||
"@vuepress/shared": "2.0.0-beta.46", | ||
"@vuepress/utils": "2.0.0-beta.46", | ||
"markdown-it": "^13.0.1", | ||
"markdown-it-anchor": "^8.6.3", | ||
"markdown-it-anchor": "^8.6.4", | ||
"markdown-it-emoji": "^2.0.2", | ||
@@ -32,0 +32,0 @@ "mdurl": "^1.0.1" |
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
73522
1985
+ Added@vuepress/shared@2.0.0-beta.46(transitive)
+ Added@vuepress/utils@2.0.0-beta.46(transitive)
- Removed@vuepress/shared@2.0.0-beta.45(transitive)
- Removed@vuepress/utils@2.0.0-beta.45(transitive)
Updatedmarkdown-it-anchor@^8.6.4