Socket
Socket
Sign inDemoInstall

micromark-core-commonmark

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

micromark-core-commonmark - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

15

dev/lib/attention.js

@@ -199,3 +199,6 @@ /**

function tokenizeAttention(effects, ok) {
const before = classifyCharacter(this.previous)
const attentionMarkers = this.parser.constructs.attentionMarkers.null
const previous = this.previous
const before = classifyCharacter(previous)
/** @type {NonNullable<Code>} */

@@ -226,6 +229,12 @@ let marker

const after = classifyCharacter(code)
const open =
!after || (after === constants.characterGroupPunctuation && before)
!after ||
(after === constants.characterGroupPunctuation && before) ||
attentionMarkers.includes(code)
const close =
!before || (before === constants.characterGroupPunctuation && after)
!before ||
(before === constants.characterGroupPunctuation && after) ||
attentionMarkers.includes(previous)
token._open = Boolean(

@@ -232,0 +241,0 @@ marker === codes.asterisk ? open : open && (before || !close)

10

lib/attention.js

@@ -187,3 +187,5 @@ /**

function tokenizeAttention(effects, ok) {
const before = classifyCharacter(this.previous)
const attentionMarkers = this.parser.constructs.attentionMarkers.null
const previous = this.previous
const before = classifyCharacter(previous)
/** @type {NonNullable<Code>} */

@@ -210,4 +212,6 @@

const after = classifyCharacter(code)
const open = !after || (after === 2 && before)
const close = !before || (before === 2 && after)
const open =
!after || (after === 2 && before) || attentionMarkers.includes(code)
const close =
!before || (before === 2 && after) || attentionMarkers.includes(previous)
token._open = Boolean(marker === 42 ? open : open && (before || !close))

@@ -214,0 +218,0 @@ token._close = Boolean(marker === 42 ? close : close && (after || !open))

{
"name": "micromark-core-commonmark",
"version": "1.0.0",
"version": "1.0.1",
"description": "The CommonMark markdown constructs",

@@ -56,3 +56,3 @@ "license": "MIT",

"micromark-util-symbol": "^1.0.0",
"micromark-util-types": "^1.0.0"
"micromark-util-types": "^1.0.1"
},

@@ -59,0 +59,0 @@ "scripts": {

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