diff options
author | bobzel <zzzman@gmail.com> | 2020-09-02 00:12:59 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-09-02 00:12:59 -0400 |
commit | 6f72743516e47a6ad077bb8e894c8005fee29fc7 (patch) | |
tree | 25e7167369be5b9e3eef30281e0734c9fd327f41 /src/client/views/nodes/formattedText/FormattedTextBox.tsx | |
parent | 4ab5484797ccc39a4e7924135f92259c2b15d88f (diff) |
fixed search in text boxes to ignore case. fixed creating new tabs when only a stack exists. fixed SearchBox to only create one time.
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index c49e38f72..436538eba 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -499,7 +499,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp if (node.isTextblock) { let index = 0, foundAt; const ep = this.getNodeEndpoints(pm.state.doc, node); - const regexp = find.replace("*", ""); + const regexp = new RegExp(find.replace("*", ""), "i"); if (regexp) { while (ep && (foundAt = node.textContent.slice(index).search(regexp)) > -1) { const sel = new TextSelection(pm.state.doc.resolve(ep.from + index + foundAt + 1), pm.state.doc.resolve(ep.from + index + foundAt + find.length + 1)); |