Changeset 59 in text-formbuilder for trunk/lib/Text/FormBuilder


Ignore:
Timestamp:
01/31/05 14:58:23 (20 years ago)
Author:
peichman
Message:

added a class="fieldgroup" attr to field group spans
added a brace_block to the parser, to parse [...] with nested [...]'s

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Text/FormBuilder/grammar

    r57 r59  
    234234value: identifier 
    235235 
    236 display_text: '[' /[^\]]+/i ']'    { $item[2] } 
     236display_text: brace_block 
     237    { (my $text = $item[1]) =~ s/^\[\s*|\s*\]$//g; $text } 
     238 
     239# square brace delimited block, that can contain properly 
     240# nested square braces, along with any other characters 
     241# return with the '[...]' so that nested blocks get the 
     242# braces treated as literals 
     243brace_block: '[' <skip:''> brace_block_content(s) ']' 
     244    { 
     245        '[' . join('', @{ $item[3] }) . ']'; 
     246    } 
     247brace_block_content: /[^\[\]]+?/ | brace_block 
     248 
    237249 
    238250validate: '//' (optional_pattern | required_pattern)    { $item[2] } 
Note: See TracChangeset for help on using the changeset viewer.