#3262: _html_splitlines reopens wrong tag in certain cases
-------------------------------------------+--------------------------------
 Reporter:  Tim Hatch <[EMAIL PROTECTED]>  |       Owner:  jonas
     Type:  defect                         |      Status:  new  
 Priority:  normal                         |   Milestone:       
Component:  browser                        |     Version:  devel
 Severity:  normal                         |    Keywords:       
-------------------------------------------+--------------------------------
 When run on the output of the PHP highlighter ({{{php -sn}}}),
 _html_splitlines chokes.  This is due to having two different passes for
 opening and closing passes.  It pretty much comes down to an incorrect
 interpretation of

 {{{
 <span class="x">
 </span><span class="y">
 }}}

 The span open on the next line should be {{{y}}}, not {{{x}}}.  This is
 solved by using a single regexp to walk the source, and keeping a more
 rigid stack of tags that are open.  This is something that I've done
 before and am willing to code up a fix in a couple of days.

 I'm attaching a patch to add a testcase in
 [source:trunk/trac/mimeview/tests/api.py trac/mimeview/tests/api.py] for
 this issue.  This is actually a real-world issue for the following sample,
 when using the php-specific highlighter:

 {{{
 #!php
 <?php
 /*
 comment
 */
 ?>
 }}}

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/3262>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets

Reply via email to