Modify ↓
#13341 closed defect (fixed)
Syntax Highlighting not preserved
Reported by: | ntmlod | Owned by: | Kate |
---|---|---|---|
Priority: | normal | Component: | PreCodeBrowserPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description (last modified by )
The issue is perhaps related to a different release of Trac or Pygments, I don't know.
My CSS rules for syntax highlighting with <pre>
tag expect that this tag is contain inside a <div class="code">
but here we have a <div class="searchable">
.
So I have coded this raw fix
-
precodebrowser/precodebrowser.py
11 11 # ITemplateStreamFilter methods 12 12 def filter_stream(self, req, method, filename, stream, data): 13 13 filter = Transformer('//table[@class = "code"]') 14 return stream | filter.rename('pre') \14 return stream | Transformer('//div[@id = "preview"]').attr('class', 'searchable code') | filter.rename('pre') \ 15 15 .select('//pre[@class = "code"]/thead').remove().end() \ 16 16 .select('//pre[@class = "code"]/tbody/tr/th').remove().end() \ 17 17 .select('//pre[@class = "code"]/tbody/tr/td').append('\n').unwrap()
Attachments (0)
Change History (2)
comment:1 Changed 7 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
In 17032: