Comparing version 1.0.5-v to 1.0.6
@@ -22,3 +22,3 @@ 'use strict' | ||
heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/, | ||
list: /^( *)(bull) [\s\S]+?(?:hr|\n*$)/ | ||
list: /^( *)(bull) [\s\S]+?(?:hr|\n{2,}(?! )(?!\1bull )\n*|\s*$)/ | ||
} | ||
@@ -31,3 +31,3 @@ block.bullet = /(?:[*+-]|\d\.)/ | ||
block.list = replace(block.list) | ||
('bull', block.bullet) | ||
(/bull/g, block.bullet) | ||
('hr', '\\n+(?=\\1(?:[*-_] *){3,}(?:\\n+|$))') | ||
@@ -297,3 +297,3 @@ () | ||
.replace(/\t/g, ' ') | ||
return this.token(src) | ||
return this.token(src, true) | ||
} | ||
@@ -330,2 +330,12 @@ | ||
if(cap = this.rules.code.exec(src)) { | ||
src = src.substring(cap[0].length) | ||
cap = cap[0].replace(/^ {4}/gm, '') | ||
this.tokens.push({ | ||
type: 'code', | ||
text: cap | ||
}) | ||
continue | ||
} | ||
if(cap = this.rules.heading.exec(src)) { | ||
@@ -402,12 +412,2 @@ src = src.substring(cap[0].length) | ||
if(cap = this.rules.code.exec(src)) { | ||
src = src.substring(cap[0].length) | ||
cap = cap[0].replace(/^ {4}/gm, '') | ||
this.tokens.push({ | ||
type: 'code', | ||
text: cap | ||
}) | ||
continue | ||
} | ||
// 顶级的p标签,只有top为true的时候才能进行该匹配 | ||
@@ -414,0 +414,0 @@ if(top && (cap = this.rules.paragraph.exec(src))) { |
{ | ||
"name": "cmarked", | ||
"version": "1.0.5v", | ||
"version": "1.0.6", | ||
"description": "更符合汉语的markdown编译器", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
16305
1
0