Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sanket Bhukan
purr-data
Commits
c3689792
Commit
c3689792
authored
9 years ago
by
Jonathan Wilkes
Browse files
Options
Downloads
Patches
Plain Diff
ignore case for search in the Pd Console window
parent
6b524493
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pd/nw/index.js
+7
-1
7 additions, 1 deletion
pd/nw/index.js
with
7 additions
and
1 deletion
pd/nw/index.js
+
7
−
1
View file @
c3689792
...
@@ -98,12 +98,18 @@ function console_unwrap_tag(console_elem, tag_name) {
...
@@ -98,12 +98,18 @@ function console_unwrap_tag(console_elem, tag_name) {
}
}
}
}
// We need to use a regular expression to search without regard to case
function
escapeRegExp
(
string
){
// $& means the whole matched string
return
string
.
replace
(
/
[
.*+?^${}()|[
\]\\]
/g
,
"
\\
$&
"
);
}
function
console_find_text
(
evt
,
callback
)
{
function
console_find_text
(
evt
,
callback
)
{
var
console_text
=
document
.
getElementById
(
"
p1
"
),
var
console_text
=
document
.
getElementById
(
"
p1
"
),
wrap_tag
=
"
mark
"
,
wrap_tag
=
"
mark
"
,
wrapper_count
,
wrapper_count
,
elem
=
evt
.
target
;
elem
=
evt
.
target
;
window
.
setTimeout
(
function
()
{
window
.
setTimeout
(
function
()
{
var
find_text
=
new
RegExp
(
escapeRegExp
(
elem
.
value
),
"
gi
"
);
console_unwrap_tag
(
console_text
,
wrap_tag
);
console_unwrap_tag
(
console_text
,
wrap_tag
);
// Check after the event if the value is empty
// Check after the event if the value is empty
if
(
elem
.
value
===
undefined
||
elem
.
value
===
""
)
{
if
(
elem
.
value
===
undefined
||
elem
.
value
===
""
)
{
...
@@ -112,7 +118,7 @@ function console_find_text(evt, callback) {
...
@@ -112,7 +118,7 @@ function console_find_text(evt, callback) {
}
else
{
}
else
{
window
.
findAndReplaceDOMText
(
console_text
,
{
window
.
findAndReplaceDOMText
(
console_text
,
{
//preset: "prose",
//preset: "prose",
find
:
elem
.
value
.
toLowerCase
()
,
find
:
find_text
,
wrap
:
wrap_tag
wrap
:
wrap_tag
});
});
// The searchAndReplace API is so bad you can't even know how
// The searchAndReplace API is so bad you can't even know how
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment