Changeset 1100

Show
Ignore:
Timestamp:
2008-07-16 22:04:34 (6 months ago)
Author:
gaspard
Message:

Fixed bug preventing parse of zena images and links when text contains '['.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/parser/lib/rules/zazen.rb

    r1016 r1100  
    250250     
    251251    def scan_bracket 
    252       #puts "BRACKET:[#{@text}]" 
     252      # puts "BRACKET:[#{@text}]" 
    253253      if @text =~ /\A\[(\w+)\](.*?)\[\/\1\]/m 
    254254        if @parse_shortcuts 
     
    261261      else 
    262262        # nothing interesting 
    263         flush 
     263        flush '[' 
    264264      end 
    265265    end 
  • trunk/lib/parser/test/parser/zazen.yml

    r1061 r1100  
    3030    end</code> 
    3131  res: "/some text.*<pre>.*<code class='ruby'>.*keyword.*method.*&lt;&lt;/" 
     32 
     33   
     34img_after_brackets: 
     35  src: | 
     36    Text updated in [July 2008]. 
     37     
     38    !30.full! 
     39  res: "<p>Text updated in [July 2008].</p>\n\n\n\t<p>[make_image id:|30| images:true mode:|full| style:||]</p>" 
    3240 
    3341code_params: 
  • trunk/test/helpers/zena_parser/zazen.yml

    r1049 r1100  
    6767  tem: "<%= zazen('Look !{30,:lake+}!') %>" 
    6868  res: "/docs.*image30_mini.*image24_mini.*/" 
     69   
     70img_after_brackets: 
     71  tem: "<%= zazen('Text updated in [July 2008].\n\n!30.full!\n') %>" 
     72  res: "<p>Text updated in [July 2008].</p>\n\n\n\t<p><img src=\"/en/30.full\" alt=\"\" /></p>" 
    6973 
    7074line_break_between_paragraphs: