Skip to content
This repository has been archived by the owner on Oct 6, 2019. It is now read-only.

Commit

Permalink
Regex fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Hansen committed Feb 19, 2019
1 parent 3d32981 commit c87f3ff
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ container
split:x:/@_dp/#?name
=:/
=:.
replace:x:/@split/0/-2?name
src:regex:/[0-9]+ - /
replace-x:x:/@split/0/-2?name
src:/[0-9]+ - /

/*
* Creating a list item, containing a hyperlink button, which once clicked,
Expand All @@ -58,7 +58,7 @@ container
widgets
a
href:#
innerValue:x:/@replace?value
innerValue:x:/@replace-x?value
.file:x:/@_dp/#?name
onclick

Expand Down
12 changes: 6 additions & 6 deletions core/p5.webapp/modules/desktop/help-files/index.hl
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ container
*/
split:x:/@_dp?value
=:/
replace:x:/@split/0/-?name
src:regex:/[0-9]+ - /
replace-x:x:/@split/0/-?name
src:/[0-9]+ - /

/*
* Creating a list item, containing a hyperlink button, which once clicked,
Expand All @@ -103,7 +103,7 @@ container
a
href:#
role:button
innerValue:x:/@replace?value
innerValue:x:/@replace-x?value
.folder:x:/@_dp?value
onclick

Expand Down Expand Up @@ -157,8 +157,8 @@ container
*/
split:x:/@_dp?value
=:/
replace:x:/@split/0/-?name
src:regex:/[0-9]+ - /
replace-x:x:/@split/0/-?name
src:/[0-9]+ - /

/*
* Creating a list item, containing a hyperlink button, which once clicked,
Expand All @@ -171,7 +171,7 @@ container
a
href:#
role:button
innerValue:x:/@replace?value
innerValue:x:/@replace-x?value
.folder:x:/@_dp?value
onclick

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ create-widgets
* Removing all non-wanted characters from filename, such as versioning information, etc.
*/
match:x:/../*/files/*/*?value
src:regex:/[-a-z]+/
src:/[-a-z]+/
trim:x:/@match/0?name
chars:-

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ create-event:desktop.help.widgets.help-index
*/
split:x:/@_dp/#?name
=:/
replace:x:/@split/0/-?name
src:regex:/^[0-9]+ - /
split:x:/@replace?value
replace-x:x:/@split/0/-?name
src:/^[0-9]+ - /
split:x:/@replace-x?value
=:.
set:x:/@split/0/-
join:x:/@split/*?name
Expand Down
2 changes: 1 addition & 1 deletion plugins/p5.strings/keywords/Replace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static void p5_string__replace (ApplicationContext context, ActiveEventAr
if (what == null)
throw new LambdaException ("[replace] requires something to search for", e.Args, context);
if (e.Name.EndsWith ("-x", System.StringComparison.CurrentCulture)) {
var regexWhat = new Regex (what);
var regexWhat = new Regex (what as string);
e.Args.Value = regexWhat.Replace (source, with);
} else {
e.Args.Value = source.Replace (Utilities.Convert<string> (context, what), with);
Expand Down

0 comments on commit c87f3ff

Please sign in to comment.