Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Aayush
purr-data
Commits
725a8774
Commit
725a8774
authored
Jul 19, 2016
by
Jonathan Wilkes
Browse files
fix bad port of tcl [string map] command to series of javascript String.replace
replacing literal "+" must come first
parent
add5c668
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/nw/pd_canvas.js
View file @
725a8774
...
...
@@ -75,11 +75,11 @@ function string_to_array_of_chunks(msg) {
// Should probably be in pdgui.js
function
encode_for_dialog
(
s
)
{
s
=
s
.
replace
(
/
\+
/g
,
"
++
"
);
s
=
s
.
replace
(
/
\s
/g
,
"
+_
"
);
s
=
s
.
replace
(
/
\$
/g
,
"
+d
"
);
s
=
s
.
replace
(
/;/g
,
"
+s
"
);
s
=
s
.
replace
(
/,/g
,
"
+c
"
);
s
=
s
.
replace
(
/
\+
/g
,
"
++
"
);
s
=
"
+
"
+
s
;
return
s
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment