Diffdown is a real-time collaborative Markdown editor/previewer built on the AT Protocol
diffdown.com
1## 6.6.0 (2026-01-13)
2
3### New features
4
5Search queries now support a generic `test` field that can be used to implement custom tests on matches.
6
7## 6.5.11 (2025-05-14)
8
9### Bug fixes
10
11Fix an issue in `replaceNext` that could cause it to create an invalid selection when replacing past the end of the document.
12
13## 6.5.10 (2025-02-26)
14
15### Bug fixes
16
17Add a close button to the `gotoLine` panel.
18
19## 6.5.9 (2025-02-12)
20
21### Bug fixes
22
23When replacing a regexp match, don't expand multi-digit replacement markers to numbers beyond the captured group count in the query.
24
25## 6.5.8 (2024-11-22)
26
27### Bug fixes
28
29Fix a bug that put the selection in the wrong place after running `replaceNext` with a regexp query that could match strings of different length.
30
31## 6.5.7 (2024-11-01)
32
33### Bug fixes
34
35Fix an issue where `findNext` and `findPrevious` would do nothing when the only match in the document was partially selected.
36
37Fix an infinite loop in `SearchCursor` when the normalizer function deletes characters.
38
39## 6.5.6 (2024-02-07)
40
41### Bug fixes
42
43Make `highlightSelectionMatches` include whitespace in the selection in its matches.
44
45Fix a bug that caused `SearchCursor` to return invalid ranges when matching astral chars that the the normalizer normalized to single-code-unit chars.
46
47## 6.5.5 (2023-11-27)
48
49### Bug fixes
50
51Fix a bug that caused codes like `\n` to be unescaped in strings inserted via replace placeholders like `$&`.
52
53Use 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.
54
55## 6.5.4 (2023-09-20)
56
57### Bug fixes
58
59Fix a bug that caused whole-word search to incorrectly check for word boundaries in some circumstances.
60
61## 6.5.3 (2023-09-14)
62
63### Bug fixes
64
65The `gotoLine` dialog is now populated with the current line number when you open it.
66
67## 6.5.2 (2023-08-26)
68
69### Bug fixes
70
71Don't use the very lowest precedence for match highlighting decorations.
72
73## 6.5.1 (2023-08-04)
74
75### Bug fixes
76
77Make `gotoLine` prefer to scroll the target line to the middle of the view.
78
79Fix an issue in `SearchCursor` where character normalization could produce nonsensical matches.
80
81## 6.5.0 (2023-06-05)
82
83### New features
84
85The new `regexp` option to `search` can be used to control whether queries have the regexp flag on by default.
86
87## 6.4.0 (2023-04-25)
88
89### Bug fixes
90
91The `findNext` and `findPrevious` commands now select the search field text if that field is focused.
92
93### New features
94
95The `scrollToMatch` callback option now receives the editor view as a second parameter.
96
97## 6.3.0 (2023-03-20)
98
99### New features
100
101The new `scrollToMatch` search option allows you to adjust the way the editor scrolls search matches into view.
102
103## 6.2.3 (2022-11-14)
104
105### Bug fixes
106
107Fix a bug that hid the search dialog's close button when the editor was read-only.
108
109## 6.2.2 (2022-10-18)
110
111### Bug fixes
112
113When `literal` is off, \n, \r, and \t escapes are now also supported in replacement text.
114
115Make sure search dialog inputs don't get treated as form fields when the editor is created inside a form.
116
117Fix a bug in `RegExpCursor` that would cause it to stop matching in the middle of a line when its current match position was equal to the length of the line.
118
119## 6.2.1 (2022-09-26)
120
121### Bug fixes
122
123By-word search queries will now skip any result that had word characters both before and after a match boundary.
124
125## 6.2.0 (2022-08-25)
126
127### New features
128
129A new `wholeWord` search query flag can be used to limit matches to whole words.
130
131`SearchCursor` and `RegExpCursor` now support a `test` parameter that can be used to ignore certain matches.
132
133## 6.1.0 (2022-08-16)
134
135### Bug fixes
136
137Fix an infinite loop when the match position of a `RegExpCursor` ended up in the middle of an UTF16 surrogate pair.
138
139### New features
140
141The `literal` search option can now be set to make literal queries the default.
142
143The new `searchPanelOpen` function can be used to find out whether the search panel is open for a given state.
144
145## 6.0.1 (2022-07-22)
146
147### Bug fixes
148
149`findNext` and `findPrevious` will now return to the current result (and scroll it into view) if no other matches are found.
150
151## 6.0.0 (2022-06-08)
152
153### Bug fixes
154
155Don't crash when a custom search panel doesn't have a field named 'search'.
156
157Make sure replacements are announced to screen readers.
158
159## 0.20.1 (2022-04-22)
160
161### New features
162
163It is now possible to disable backslash escapes in search queries with the `literal` option.
164
165## 0.20.0 (2022-04-20)
166
167### Bug fixes
168
169Make the `wholeWords` option to `highlightSelectionMatches` default to false, as intended.
170
171## 0.19.10 (2022-04-04)
172
173### Bug fixes
174
175Make sure search matches are highlighted when scrolling new content into view.
176
177## 0.19.9 (2022-03-03)
178
179### New features
180
181The selection-matching extension now accepts a `wholeWords` option that makes it only highlight matches that span a whole word. Add SearchQuery.getCursor
182
183The `SearchQuery` class now has a `getCursor` method that allows external code to create a cursor for the query.
184
185## 0.19.8 (2022-02-14)
186
187### Bug fixes
188
189Fix a bug that caused the search panel to start open when configuring a state with the `search()` extension.
190
191## 0.19.7 (2022-02-14)
192
193### Breaking changes
194
195`searchConfig` is deprecated in favor of `search` (but will exist until next major release).
196
197### New features
198
199The new `search` function is now used to enable and configure the search extension.
200
201## 0.19.6 (2022-01-27)
202
203### Bug fixes
204
205Make `selectNextOccurrence` scroll the newly selected range into view.
206
207## 0.19.5 (2021-12-16)
208
209### Breaking changes
210
211The search option `matchCase` was renamed to `caseSensitive` (the old name will continue to work until the next breaking release).
212
213### Bug fixes
214
215`openSearchPanel` will now update the search query to the current selection even if the panel was already open.
216
217### New features
218
219Client code can now pass a custom search panel creation function in the search configuration.
220
221The `getSearchQuery` function and `setSearchQuery` effect can now be used to inspect or change the current search query.
222
223## 0.19.4 (2021-12-02)
224
225### Bug fixes
226
227The search panel will no longer show the replace interface when the editor is read-only.
228
229## 0.19.3 (2021-11-22)
230
231### Bug fixes
232
233Add `userEvent` annotations to search and replace transactions.
234
235Make sure the editor handles keys bound to `findNext`/`findPrevious` even when there are no matches, to avoid the browser's search interrupting users.
236
237### New features
238
239Add a `Symbol.iterator` property to the cursor types, so that they can be used with `for`/`of`.
240
241## 0.19.2 (2021-09-16)
242
243### Bug fixes
244
245`selectNextOccurrence` will now only select partial words if the current main selection hold a partial word.
246
247Explicitly set the button's type to prevent the browser from submitting forms wrapped around the editor.
248
249## 0.19.1 (2021-09-06)
250
251### Bug fixes
252
253Make `highlightSelectionMatches` not produce overlapping decorations, since those tend to just get unreadable.
254
255Make sure any existing search text is selected when opening the search panel. Add search config option to not match case when search panel is opened (#4)
256
257### New features
258
259The `searchConfig` function now takes a `matchCase` option that controls whether the search panel starts in case-sensitive mode.
260
261## 0.19.0 (2021-08-11)
262
263### Bug fixes
264
265Make sure to prevent the native Mod-d behavior so that the editor doesn't lose focus after selecting past the last occurrence.
266
267## 0.18.4 (2021-05-27)
268
269### New features
270
271Initialize the search query to the current selection, when there is one, when opening the search dialog.
272
273Add a `searchConfig` function, supporting an option to put the search panel at the top of the editor.
274
275## 0.18.3 (2021-05-18)
276
277### Bug fixes
278
279Fix a bug where the first search command in a new editor wouldn't properly open the panel.
280
281### New features
282
283New command `selectNextOccurrence` that selects the next occurrence of the selected word (bound to Mod-d in the search keymap).
284
285## 0.18.2 (2021-03-19)
286
287### Bug fixes
288
289The search interface and cursor will no longer include overlapping matches (aligning with what all other editors are doing).
290
291### New features
292
293The package now exports a `RegExpCursor` which is a search cursor that matches regular expression patterns.
294
295The search/replace interface now allows the user to use regular expressions.
296
297The `SearchCursor` class now has a `nextOverlapping` method that includes matches that start inside the previous match.
298
299Basic backslash escapes (\n, \r, \t, and \\) are now accepted in string search patterns in the UI.
300
301## 0.18.1 (2021-03-15)
302
303### Bug fixes
304
305Fix an issue where entering an invalid input in the goto-line dialog would submit a form and reload the page.
306
307## 0.18.0 (2021-03-03)
308
309### Breaking changes
310
311Update dependencies to 0.18.
312
313## 0.17.1 (2021-01-06)
314
315### New features
316
317The package now also exports a CommonJS module.
318
319## 0.17.0 (2020-12-29)
320
321### Breaking changes
322
323First numbered release.
324