Discussion:
[Mason-devel] Minor bug in regex used in match_comp_content_call_end (Lexer.pm)?
Alex Robinson
2007-10-18 18:43:45 UTC
Permalink
I think I found a very minor bug in Lexer.pm

match_comp_content_call_end, line 453
if ( $self->{current}{comp_source} =~ m,\G</&(.*?)>,gc )
<<<<

Shouldn't the modifier flags be 'gcs' as is the case with
match_comp_content_call?


Currently, the following causes a compilation error

====================================================
<&|
Wrap
&>
Hello
</&
Wrap
Goodbye

<%def Wrap>
[Wrap start] <% $m->content %> [Wrap end]
</%def>
====================================================

But I'm assuming the fact that the opening component with content
call can be broken on to multiple lines and that
match_comp_content_call_end attempts to do a tr on the content of the
matched end call for the line count means that it shouldn't...
Dave Rolsky
2007-10-18 22:52:27 UTC
Permalink
Post by Alex Robinson
I think I found a very minor bug in Lexer.pm
match_comp_content_call_end, line 453
if ( $self->{current}{comp_source} =~ m,\G</&(.*?)>,gc )
<<<<
Shouldn't the modifier flags be 'gcs' as is the case with
match_comp_content_call?
Err, probably ;)
Post by Alex Robinson
Currently, the following causes a compilation error
====================================================
<&|
Wrap
&>
Hello
</&
Wrap
Goodbye
<%def Wrap>
[Wrap start] <% $m->content %> [Wrap end]
</%def>
====================================================
But I'm assuming the fact that the opening component with content
call can be broken on to multiple lines and that
match_comp_content_call_end attempts to do a tr on the content of the
matched end call for the line count means that it shouldn't...
Patches are very much welcome ;)


-dave

/*===================================================
VegGuide.Org www.BookIRead.com
Your guide to all that's veg. My book blog
===================================================*/

Loading...