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

@codemirror/search

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/search - npm Package Compare versions

Comparing version 0.20.0 to 0.20.1

6

CHANGELOG.md

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

## 0.20.1 (2022-04-22)
### New features
It is now possible to disable backslash escapes in search queries with the `literal` option.
## 0.20.0 (2022-04-20)

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

@@ -241,2 +241,8 @@ import * as _codemirror_state from '@codemirror/state';

/**
By default, string search will replace `\n`, `\r`, and `\t` in
the query with newline, return, and tab characters. When this
is set to true, that behavior is disabled.
*/
literal?: boolean;
/**
When true, interpret the search string as a regular expression.

@@ -243,0 +249,0 @@ */

2

dist/index.js

@@ -574,3 +574,3 @@ import { showPanel, EditorView, getPanel, Decoration, ViewPlugin, runScopeHandlers } from '@codemirror/view';

this.valid = !!this.search && (!this.regexp || validRegExp(this.search));
this.unquoted = this.search.replace(/\\([nrt\\])/g, (_, ch) => ch == "n" ? "\n" : ch == "r" ? "\r" : ch == "t" ? "\t" : "\\");
this.unquoted = config.literal ? this.search : this.search.replace(/\\([nrt\\])/g, (_, ch) => ch == "n" ? "\n" : ch == "r" ? "\r" : ch == "t" ? "\t" : "\\");
}

@@ -577,0 +577,0 @@ /**

{
"name": "@codemirror/search",
"version": "0.20.0",
"version": "0.20.1",
"description": "Search functionality 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