Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki

This commit is contained in:
Jacques Distler 2009-12-25 03:21:49 -06:00
commit b4589e197d

View file

@ -1,4 +1,5 @@
require 'syntax' require 'syntax'
require 'stringsupport'
module Syntax module Syntax
@ -77,7 +78,7 @@ module Syntax
# http://www.w3.org/TR/CSS21/syndata.html # http://www.w3.org/TR/CSS21/syndata.html
macro(:h, /([0-9a-fA-F])/ ) # uppercase A-Z added? macro(:h, /([0-9a-fA-F])/ ) # uppercase A-Z added?
macro(:nonascii, /([\200-\377])/ ) macro(:nonascii, /([^\000-\177])/ )
macro(:nl, /(\n|\r\n|\r|\f)/ ) macro(:nl, /(\n|\r\n|\r|\f)/ )
macro(:unicode, /(\\#{m(:h)}{1,6}(\r\n|[ \t\r\n\f])?)/ ) macro(:unicode, /(\\#{m(:h)}{1,6}(\r\n|[ \t\r\n\f])?)/ )
macro(:escape, /(#{m(:unicode)}|\\[^\r\n\f0-9a-f])/ ) macro(:escape, /(#{m(:unicode)}|\\[^\r\n\f0-9a-f])/ )
@ -208,7 +209,8 @@ module Syntax
end end
# scanning declarations only # scanning declarations only
when !@selector && scan(@tokens[:RBRACE]): @selector = true when !@selector && scan(@tokens[:RBRACE])
@selector = true
start_group :normal, matched start_group :normal, matched
when !@selector && scan(@tokens[:FUNCTION]) when !@selector && scan(@tokens[:FUNCTION])
start_group :function, matched start_group :function, matched