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

micromark-extension-gfm-strikethrough

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micromark-extension-gfm-strikethrough - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

61

index.js
module.exports = create
var classifyCharacter = require('micromark/dist/util/classify-character')
var chunkedSplice = require('micromark/dist/util/chunked-splice')
var resolveAll = require('micromark/dist/util/resolve-all')
var shallow = require('micromark/dist/util/shallow')
var resolveAll = require('micromark/dist/util/resolve-all')

@@ -25,3 +26,2 @@ var characterGroupPunctuation = 2

function resolveAllStrikethrough(events, context) {
var length = events.length
var index = -1

@@ -33,6 +33,6 @@ var strikethrough

var indexOpen
var eventsUpTo
var nextEvents
// Walk through all events.
while (++index < length) {
while (++index < events.length) {
closing = events[index][1]

@@ -71,13 +71,15 @@

eventsUpTo = [].concat(
// Before.
events.slice(0, indexOpen - 1),
// Opening.
[
['enter', strikethrough, context],
['enter', opening, context],
['exit', opening, context],
['enter', text, context]
],
// Between.
// Opening.
nextEvents = [
['enter', strikethrough, context],
['enter', opening, context],
['exit', opening, context],
['enter', text, context]
]
// Between.
chunkedSplice(
nextEvents,
nextEvents.length,
0,
resolveAll(

@@ -87,16 +89,21 @@ context.parser.constructs.insideSpan.null,

context
),
// Closing.
[
['exit', text, context],
['enter', closing, context],
['exit', closing, context],
['exit', strikethrough, context]
]
)
)
// After.
events = eventsUpTo.concat(events.slice(index + 2))
length = events.length
index = eventsUpTo.length - 1
// Closing.
chunkedSplice(nextEvents, nextEvents.length, 0, [
['exit', text, context],
['enter', closing, context],
['exit', closing, context],
['exit', strikethrough, context]
])
chunkedSplice(
events,
indexOpen - 1,
index - indexOpen + 3,
nextEvents
)
index = indexOpen + nextEvents.length - 2
break

@@ -103,0 +110,0 @@ }

{
"name": "micromark-extension-gfm-strikethrough",
"version": "0.5.0",
"version": "0.6.0",
"description": "micromark extension to support GFM strikethrough",

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

"fault": "^1.0.0",
"micromark": "~2.8.0"
"micromark": "~2.9.0"
},

@@ -39,0 +39,0 @@ "devDependencies": {

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