Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cmarked

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmarked - npm Package Compare versions

Comparing version 1.0.5-v to 1.0.6

26

lib/cmarked.js

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

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