micromark-core-commonmark
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -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) |
@@ -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": { |
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
203108
6640
Updatedmicromark-util-types@^1.0.1