I have a mako template that looks something like this:
% if staff:
    <!-- begin staff -->
    ...
    <!-- end staff -->
% endif
That way if I pass the staff variable as being True, those comments should appear. I'm trying to test this by using a regular expression that looks like this:
re.search('<!-- begin staff -->.*<!-- end staff -->', text)
I've verified that the comments appear in the HTML output, but the regular expression doesn't match.  I've even tried putting the comments (<!-- begin staff --> and <!-- end staff -->) through re.escape, but still no luck.  What am I doing wrong?
Or is there a better way to run this test?
 
     
     
    