@codemirror/search
Advanced tools
Comparing version 6.5.4 to 6.5.5
@@ -0,1 +1,9 @@ | ||
## 6.5.5 (2023-11-27) | ||
### Bug fixes | ||
Fix a bug that caused codes like `\n` to be unescaped in strings inserted via replace placeholders like `$&`. | ||
Use the keybinding Mod-Alt-g for `gotoLine` to the search keymap, to make it usable for people whose keyboard layout uses Alt/Option-g to type some character. | ||
## 6.5.4 (2023-09-20) | ||
@@ -2,0 +10,0 @@ |
@@ -370,3 +370,3 @@ import * as _codemirror_state from '@codemirror/state'; | ||
- Shift-F3, Shift-Mod-g: [`findPrevious`](https://codemirror.net/6/docs/ref/#search.findPrevious) | ||
- Alt-g: [`gotoLine`](https://codemirror.net/6/docs/ref/#search.gotoLine) | ||
- Mod-Alt-g: [`gotoLine`](https://codemirror.net/6/docs/ref/#search.gotoLine) | ||
- Mod-d: [`selectNextOccurrence`](https://codemirror.net/6/docs/ref/#search.selectNextOccurrence) | ||
@@ -373,0 +373,0 @@ */ |
@@ -733,6 +733,6 @@ import { showPanel, EditorView, getPanel, Decoration, ViewPlugin, runScopeHandlers } from '@codemirror/view'; | ||
getReplacement(result) { | ||
return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g, (m, i) => i == "$" ? "$" | ||
return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g, (m, i) => i == "$" ? "$" | ||
: i == "&" ? result.match[0] | ||
: i != "0" && +i < result.match.length ? result.match[i] | ||
: m)); | ||
: m); | ||
} | ||
@@ -1030,3 +1030,3 @@ matchAll(state, limit) { | ||
- Shift-F3, Shift-Mod-g: [`findPrevious`](https://codemirror.net/6/docs/ref/#search.findPrevious) | ||
- Alt-g: [`gotoLine`](https://codemirror.net/6/docs/ref/#search.gotoLine) | ||
- Mod-Alt-g: [`gotoLine`](https://codemirror.net/6/docs/ref/#search.gotoLine) | ||
- Mod-d: [`selectNextOccurrence`](https://codemirror.net/6/docs/ref/#search.selectNextOccurrence) | ||
@@ -1040,3 +1040,3 @@ */ | ||
{ key: "Mod-Shift-l", run: selectSelectionMatches }, | ||
{ key: "Alt-g", run: gotoLine }, | ||
{ key: "Mod-Alt-g", run: gotoLine }, | ||
{ key: "Mod-d", run: selectNextOccurrence, preventDefault: true }, | ||
@@ -1043,0 +1043,0 @@ ]; |
{ | ||
"name": "@codemirror/search", | ||
"version": "6.5.4", | ||
"version": "6.5.5", | ||
"description": "Search functionality for the CodeMirror code editor", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
132088