New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lezer/markdown

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lezer/markdown - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## 1.0.3 (2023-06-22)
### Bug fixes
Only parse list items as tasks when there is whitespace after the checkbox brackets. Remove an unnecessary regexp operator
Fix a crash doing an incremental parse on input ranges with gaps between them.
## 1.0.2 (2022-09-21)

@@ -2,0 +10,0 @@

4

dist/markdown.d.ts

@@ -68,3 +68,3 @@ import { Tree, NodeType, NodePropSource, TreeFragment, NodeSet, Input, Parser, PartialParse, ParseWrapper } from "@lezer/common";

export declare function space(ch: number): boolean;
declare type BlockResult = boolean | null;
type BlockResult = boolean | null;
export declare class BlockContext implements PartialParse {

@@ -130,3 +130,3 @@ readonly parser: MarkdownParser;

}
export declare type MarkdownExtension = MarkdownConfig | readonly MarkdownExtension[];
export type MarkdownExtension = MarkdownConfig | readonly MarkdownExtension[];
export declare class MarkdownParser extends Parser {

@@ -133,0 +133,0 @@ readonly nodeSet: NodeSet;

{
"name": "@lezer/markdown",
"version": "1.0.2",
"version": "1.0.3",
"description": "Incremental Markdown parser that consumes and emits Lezer trees",

@@ -13,3 +13,3 @@ "main": "dist/index.cjs",

"types": "dist/index.d.ts",
"author": "Marijn Haverbeke <marijnh@gmail.com>",
"author": "Marijn Haverbeke <marijn@haverbeke.berlin>",
"license": "MIT",

@@ -21,3 +21,3 @@ "devDependencies": {

"rollup": "^2.52.2",
"rollup-plugin-typescript2": "^0.30.0",
"rollup-plugin-typescript2": "^0.34.1",
"ts-node": "^10.0.0",

@@ -24,0 +24,0 @@ "typescript": "^4.3.4",

@@ -159,3 +159,3 @@ import {InlineContext, BlockContext, MarkdownConfig,

leaf(cx, leaf) {
return /^\[[ xX]\]/.test(leaf.content) && cx.parentType().name == "ListItem" ? new TaskParser : null
return /^\[[ xX]\][ \t]/.test(leaf.content) && cx.parentType().name == "ListItem" ? new TaskParser : null
},

@@ -162,0 +162,0 @@ after: "SetextHeading"

@@ -248,2 +248,13 @@ import {Tree, TreeFragment} from "@lezer/common"

})
it("places reused nodes at the right position when there are gaps before them", () => {
let doc = " {{}}\nb\n{{}}"
let ast1 = parser.parse(doc, undefined, [{from: 0, to: 1}, {from: 5, to: 8}])
let frag = TreeFragment.applyChanges(TreeFragment.addTree(ast1), [{fromA: 0, toA: 0, fromB: 0, toB: 1}])
let ast2 = parser.parse(" " + doc, frag, [{from: 0, to: 2}, {from: 6, to: 9}])
ist(ast2.toString(), "Document(Paragraph)")
let p = ast2.topNode.firstChild!
ist(p.from, 7)
ist(p.to, 8)
})
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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