freebsd-ports/www/aswiki/files/patch-scanner.rb
Makoto Matsushita ae33577db3 Add a patch to fix warning about character-class string.
Bump PORTREVISION.

Why patch needed?  According ruby 1.8 language definition, even if
the first character-class string is square branket, warn if not
escaped with backslash.  See also ruby/regex.c rev 1.81(*1).  Since
[\]] is properly processed by ruby 1.6, patch this unconditionally.

Adviced about ruby language by: knu, hrs

*1) http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/regex.c#rev1.81
2004-05-04 13:27:57 +00:00

16 lines
734 B
Ruby

--- aswiki/scanner.rb.dist Fri Jan 17 22:56:47 2003
+++ aswiki/scanner.rb Tue May 4 22:17:21 2004
@@ -97,11 +97,11 @@
q.push [:TABLE_END, tmp]
elsif tmp = sc.scan(/\A\|\|/)
q.push [:TABLE, tmp]
- elsif tmp = sc.scan(/\A\[img:#{URI::REGEXP::PATTERN::X_ABS_URI}\s+[^]]+?\]/xn)
+ elsif tmp = sc.scan(/\A\[img:#{URI::REGEXP::PATTERN::X_ABS_URI}\s+[^\]]+?\]/xn)
q.push [:MOINHREFIMG, tmp]
# elsif tmp = sc.scan(/\A\[\S+ +\S+?\]/)
# elsif tmp = sc.scan(/\A\[\S+ +[^]]+?\]/)
- elsif tmp = sc.scan(/\A\[#{URI::REGEXP::PATTERN::X_ABS_URI}\s+[^]]+?\]/xn)
+ elsif tmp = sc.scan(/\A\[#{URI::REGEXP::PATTERN::X_ABS_URI}\s+[^\]]+?\]/xn)
q.push [:MOINHREF, tmp]
elsif tmp = sc.scan(/\A\{\{/)
q.push [:ESCAPE_BEGIN, tmp]