Socket
Socket
Sign inDemoInstall

micromark-extension-gfm-table

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 1.0.0 to 1.0.1

34

dev/lib/syntax.js

@@ -13,3 +13,3 @@ /**

import assert from 'assert'
import assert from 'power-assert'
import {factorySpace} from 'micromark-factory-space'

@@ -42,4 +42,2 @@ import {

let index = -1
/** @type {Token} */
let token
/** @type {boolean|undefined} */

@@ -51,8 +49,2 @@ let inHead

let inRow
/** @type {Token} */
let cell
/** @type {Token} */
let content
/** @type {Token} */
let text
/** @type {number|undefined} */

@@ -66,3 +58,3 @@ let contentStart

while (++index < events.length) {
token = events[index][1]
const token = events[index][1]

@@ -80,9 +72,13 @@ if (inRow) {

) {
content = {
assert(
contentStart,
'expected `contentStart` to be defined if `contentEnd` is'
)
const content = {
type: 'tableContent',
// @ts-expect-error `contentStart` is defined if `contentEnd` is too.
start: events[contentStart][1].start,
end: events[contentEnd][1].end
}
text = {
/** @type {Token} */
const text = {
type: types.chunkText,

@@ -95,6 +91,9 @@ start: content.start,

assert(
contentStart,
'expected `contentStart` to be defined if `contentEnd` is'
)
events.splice(
// @ts-expect-error `contentStart` is defined if `contentEnd` is too.
contentStart,
// @ts-expect-error `contentStart` is defined if `contentEnd` is too.
contentEnd - contentStart + 1,

@@ -106,3 +105,3 @@ ['enter', content, context],

)
// @ts-expect-error `contentStart` is defined if `contentEnd` is too.
index -= contentEnd - contentStart - 3

@@ -123,3 +122,3 @@ contentStart = undefined

) {
cell = {
const cell = {
type: inDelimiterRow

@@ -293,3 +292,2 @@ ? 'tableDelimiter'

function atDelimiterLineStart(code) {
// To do: is the lazy setext thing still needed?
return effects.check(

@@ -296,0 +294,0 @@ setextUnderlineMini,

@@ -40,5 +40,2 @@ /**

let index = -1
/** @type {Token} */
let token
/** @type {boolean|undefined} */

@@ -53,11 +50,2 @@

let inRow
/** @type {Token} */
let cell
/** @type {Token} */
let content
/** @type {Token} */
let text
/** @type {number|undefined} */

@@ -74,3 +62,3 @@

while (++index < events.length) {
token = events[index][1]
const token = events[index][1]

@@ -88,9 +76,10 @@ if (inRow) {

) {
content = {
const content = {
type: 'tableContent',
// @ts-expect-error `contentStart` is defined if `contentEnd` is too.
start: events[contentStart][1].start,
end: events[contentEnd][1].end
}
text = {
/** @type {Token} */
const text = {
type: 'chunkText',

@@ -103,4 +92,3 @@ start: content.start,

events.splice(
// @ts-expect-error `contentStart` is defined if `contentEnd` is too.
contentStart, // @ts-expect-error `contentStart` is defined if `contentEnd` is too.
contentStart,
contentEnd - contentStart + 1,

@@ -111,4 +99,3 @@ ['enter', content, context],

['exit', content, context]
) // @ts-expect-error `contentStart` is defined if `contentEnd` is too.
)
index -= contentEnd - contentStart - 3

@@ -129,3 +116,3 @@ contentStart = undefined

) {
cell = {
const cell = {
type: inDelimiterRow

@@ -292,3 +279,2 @@ ? 'tableDelimiter'

function atDelimiterLineStart(code) {
// To do: is the lazy setext thing still needed?
return effects.check(

@@ -295,0 +281,0 @@ setextUnderlineMini,

{
"name": "micromark-extension-gfm-table",
"version": "1.0.0",
"version": "1.0.1",
"description": "micromark extension to support GFM tables",

@@ -46,5 +46,7 @@ "license": "MIT",

"micromark-util-symbol": "^1.0.0",
"micromark-util-types": "^1.0.0"
"micromark-util-types": "^1.0.0",
"power-assert": "^1.0.0"
},
"devDependencies": {
"@types/power-assert": "^1.0.0",
"@types/tape": "^4.0.0",

@@ -55,4 +57,4 @@ "c8": "^7.0.0",

"prettier": "^2.0.0",
"remark-cli": "^9.0.0",
"remark-preset-wooorm": "^8.0.0",
"remark-cli": "^10.0.0",
"remark-preset-wooorm": "^9.0.0",
"rimraf": "^3.0.0",

@@ -62,3 +64,3 @@ "tape": "^5.0.0",

"typescript": "^4.0.0",
"xo": "^0.39.0"
"xo": "^0.45.0"
},

@@ -65,0 +67,0 @@ "scripts": {

@@ -64,3 +64,3 @@ # micromark-extension-gfm-table

The export map supports the endorsed
[`development` condition](https://nodejs.org/api/packages.html#packages_resolving_user_conditions).
[`development` condition](https://nodejs.org/api/packages.html#packages\_resolving\_user\_conditions).
Run `node --conditions development module.js` to get instrumented dev code.

@@ -67,0 +67,0 @@ Without this condition, production code is loaded.

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