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

@codemirror/legacy-modes

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/legacy-modes - npm Package Compare versions

Comparing version 6.4.2 to 6.4.3

10

CHANGELOG.md

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

## 6.4.3 (2025-02-12)
### Bug fixes
Make Pascal keyword matching case-insensitive.
Fix a crash in simple-mode.js when using the `dontIndentStates` feature.
Fix a bug in tokenizing multiline strings in xQuery.
## 6.4.2 (2024-11-05)

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

2

mode/pascal.js

@@ -61,3 +61,3 @@ function words(str) {

stream.eatWhile(/[\w\$_]/);
var cur = stream.current();
var cur = stream.current().toLowerCase();
if (keywords.propertyIsEnumerable(cur)) return "keyword";

@@ -64,0 +64,0 @@ if (atoms.propertyIsEnumerable(cur)) return "atom";

@@ -26,3 +26,3 @@ <!-- NOTE: README.md is generated from mode/README.md -->

## Example
## Usage

@@ -29,0 +29,0 @@ Using modes from this package works like this:

@@ -113,3 +113,3 @@ export function simpleMode(states) {

return function(state, textAfter) {
if (state.indent == null || meta.dontIndentStates && meta.doneIndentState.indexOf(state.state) > -1)
if (state.indent == null || meta.dontIndentStates && meta.dontIndentStates.indexOf(state.state) > -1)
return null

@@ -116,0 +116,0 @@

@@ -132,3 +132,3 @@ // The keywords object is set to the result of this self executing

else if (!isEQName && (ch === '"' || ch === "'"))
return chain(stream, state, tokenString(ch));
return startString(stream, state, ch);
// variable

@@ -233,31 +233,12 @@ else if(ch === "$") {

var ch;
if(isInString(state) && stream.current() == quote) {
popStateStack(state);
if(f) state.tokenize = f;
return "string";
}
pushStateStack(state, { type: "string", name: quote, tokenize: tokenString(quote, f) });
// if we're in a string and in an XML block, allow an embedded code block
if(stream.match("{", false) && isInXmlAttributeBlock(state)) {
state.tokenize = tokenBase;
return "string";
}
while (ch = stream.next()) {
if (ch == quote) {
if (ch == quote) {
popStateStack(state);
if(f) state.tokenize = f;
if (f) state.tokenize = f;
break;
}
else {
} else if (stream.match("{", false) && isInXmlAttributeBlock(state)) {
// if we're in a string and in an XML block, allow an embedded code block in an attribute
if(stream.match("{", false) && isInXmlAttributeBlock(state)) {
state.tokenize = tokenBase;
return "string";
}
pushStateStack(state, { type: "codeblock"});
state.tokenize = tokenBase;
return "string";
}

@@ -270,2 +251,8 @@ }

function startString(stream, state, quote, f) {
let tokenize = tokenString(quote, f);
pushStateStack(state, { type: "string", name: quote, tokenize });
return chain(stream, state, tokenize);
}
// tokenizer for variables

@@ -328,3 +315,3 @@ function tokenVariable(stream, state) {

if (ch == '"' || ch == "'")
return chain(stream, state, tokenString(ch, tokenAttribute));
return startString(stream, state, ch, tokenAttribute);

@@ -331,0 +318,0 @@ if(!isInXmlAttributeBlock(state))

{
"name": "@codemirror/legacy-modes",
"version": "6.4.2",
"version": "6.4.3",
"description": "Collection of ported legacy language modes for the CodeMirror code editor",

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

@@ -26,3 +26,3 @@ <!-- NOTE: README.md is generated from mode/README.md -->

## Example
## Usage

@@ -29,0 +29,0 @@ Using modes from this package works like this:

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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