Skip to content

Commit

Permalink
Fixed Zafu code syntax with new '?' allowed in tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspard committed Mar 25, 2011
1 parent 765a6d0 commit 40fa69b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/zena/code_syntax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ def convert( text, pre=true )
end # CodeSyntax

class ZafuTokenizer < Syntax::Tokenizer
METHOD = "[\\w]+\\??"
def step
if ztag = scan(/\A<\/?r:[^>]+>/)
ztag =~ /<(\/?)r:([\w_]+)([^>]*?)(\/?)>/
ztag =~ /<(\/?)r:(#{METHOD})([^>]*?)(\/?)>/
start_group :tag, "<#{$1}r:"
start_group :ztag, $2
trailing = $4
Expand Down

0 comments on commit 40fa69b

Please sign in to comment.