aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/param.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-11-05 19:47:31 -0400
committerRalph Amissah <ralph@amissah.com>2011-11-05 19:47:31 -0400
commit842a21e0f108555d829fa9f49cc255eff9191311 (patch)
treec000585cc7d35502e7068d26109bf410f1ece360 /lib/sisu/v3/param.rb
parentdebian/changelog (3.1.2-1) (diff)
parentv3: fix necessary, Re: (3.1.2) [da4acc7] header, bold & italic pattern matching (diff)
Merge commit 'sisu_3.1.3' into debian/sid
Diffstat (limited to 'lib/sisu/v3/param.rb')
-rw-r--r--lib/sisu/v3/param.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb
index 37ffeea7..ef8e9389 100644
--- a/lib/sisu/v3/param.rb
+++ b/lib/sisu/v3/param.rb
@@ -777,10 +777,10 @@ module SiSU_Param
i=(m=~/\/i$/)? 'i' : ''
z=if m
x=m.gsub(/^\/(.+?)\/i?/,'\1')
- x.gsub!(/\(/,'(?:') # avoid need to escape use of brackets within regex provided
- rgx='\b(' + m + ')\b'
+ x.gsub!(/\((?:\?:)?/,'(?:') # avoid need to escape use of brackets within regex provided
+ rgx='\b(' + x + ')\b'
y=((i =~/i/) ? (/#{rgx}/i) : (/#{rgx}/))
- { str: '\b(?:' + m + ')\b', regx: y, i: i }
+ { str: '\b(?:' + x + ')\b', regx: y, i: i }
else nil
end
z
@@ -790,10 +790,10 @@ module SiSU_Param
i=((m=~/\/i$/) ? 'i' : '')
z=if m
x=m.gsub(/^\/(.+?)\/i?/,'\1')
- x.gsub!(/\(/,'(?:') # avoid need to escape use of brackets within regex provided
- rgx='\b(' + m + ')\b'
+ x.gsub!(/\((?:\?:)?/,'(?:') # avoid need to escape use of brackets within regex provided
+ rgx='\b(' + x + ')\b'
y=((i =~/i/) ? (/#{rgx}/i) : (/#{rgx}/))
- { str: '\b(?:' + m + ')\b', regx: y, i: i }
+ { str: '\b(?:' + x + ')\b', regx: y, i: i }
else nil
end
z