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

@lezer/markdown

Package Overview
Dependencies
Maintainers
1
Versions
23
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.3.2 to 1.4.0

10

CHANGELOG.md

@@ -0,1 +1,11 @@

## 1.4.0 (2025-01-07)
### Bug fixes
Fix a regression in the autolink extension that made it fail to match some kinds of email addresses.
### New features
The new `BlockContext.peekLine` method can be used to scan the line ahead of the current one.
## 1.3.2 (2024-10-29)

@@ -2,0 +12,0 @@

1

dist/markdown.d.ts

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

nextLine(): boolean;
peekLine(): string;
private moveRangeI;

@@ -87,0 +88,0 @@ private lineChunkAt;

2

package.json
{
"name": "@lezer/markdown",
"version": "1.3.2",
"version": "1.4.0",
"description": "Incremental Markdown parser that consumes and emits Lezer trees",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs",

@@ -33,2 +33,4 @@ import {InlineContext, BlockContext, MarkdownConfig,

// Parse a line as a table row and return the row count. When `elts`
// is given, push syntax elements for the content onto it.
function parseRow(cx: BlockContext, line: string, startI = 0, elts?: Element[], offset = 0) {

@@ -129,3 +131,3 @@ let count = 0, first = true, cellStart = -1, cellEnd = -1, esc = false

if (leaf.parsers.some(p => p instanceof TableParser) || !hasPipe(line.text, line.basePos)) return false
let next = cx.scanLine(cx.absoluteLineEnd + 1).text
let next = cx.peekLine()
return delimiterLine.test(next) && parseRow(cx, line.text, line.basePos) == parseRow(cx, next, line.basePos)

@@ -167,3 +169,3 @@ },

const autolinkRE = /(www\.)|(https?:\/\/)|([\w.+-]{,100}@)|(mailto:|xmpp:)/gy
const autolinkRE = /(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy
const urlRE = /[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy

@@ -170,0 +172,0 @@ const lastTwoDomainWords = /[\w-]+\.[\w-]+($|\/)/

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 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