lys-markdown-parser
Advanced tools
Comparing version 3.13.4 to 3.13.5
{ | ||
"name": "lys-markdown-parser", | ||
"version": "3.13.4", | ||
"version": "3.13.5", | ||
"description": "js markdown parser", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -24,2 +24,15 @@ /** | ||
/** | ||
* 解码链接,解决链接中的中文编码显示问题 | ||
* @param {string} v | ||
* @returns | ||
*/ | ||
function decodeUrl(v) { | ||
try { | ||
return decodeURIComponent(v) | ||
} catch (_) { | ||
return v | ||
} | ||
} | ||
/** | ||
* AST 转 dom | ||
@@ -118,3 +131,3 @@ * @param {ASTNode} node | ||
a.href = i; | ||
a.textContent = i; | ||
a.textContent = decodeUrl(i); | ||
a.referrerPolicy = 'no-referrer'; // 禁止外联追踪原始地址 | ||
@@ -121,0 +134,0 @@ a.target = '_blank'; |
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
317997
7720