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

@codemirror/lang-markdown

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/lang-markdown - npm Package Compare versions

Comparing version 0.19.3 to 0.19.4

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 0.19.4 (2022-01-03)
### Bug fixes
Fix a bug where list items after a removed item were incorrectly renumbered.
## 0.19.3 (2021-12-10)

@@ -2,0 +8,0 @@

7

dist/index.js

@@ -151,3 +151,3 @@ import { EditorSelection, Prec } from '@codemirror/state';

}
function renumberList(after, doc, changes) {
function renumberList(after, doc, changes, offset = 0) {
for (let prev = -1, node = after;;) {

@@ -160,3 +160,3 @@ if (node.name == "ListItem") {

return;
changes.push({ from: node.from + m[1].length, to: node.from + m[0].length, insert: String(prev + 2) });
changes.push({ from: node.from + m[1].length, to: node.from + m[0].length, insert: String(prev + 2 + offset) });
}

@@ -212,6 +212,5 @@ prev = number;

if (inner.node.name == "OrderedList")
renumberList(inner.item, doc, changes);
renumberList(inner.item, doc, changes, -2);
if (next && next.node.name == "OrderedList")
renumberList(next.item, doc, changes);
// FIXME renumber
return { range: EditorSelection.cursor(delTo + insert.length), changes };

@@ -218,0 +217,0 @@ }

{
"name": "@codemirror/lang-markdown",
"version": "0.19.3",
"version": "0.19.4",
"description": "Markdown language support for the CodeMirror code editor",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

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