Opened 16 years ago
Closed 14 years ago
#3608 closed enhancement (fixed)
(patch) add Syntax Coloring of Source Code to blog
Reported by: | Wang Diancheng | Owned by: | osimons |
---|---|---|---|
Priority: | normal | Component: | FullBlogPlugin |
Severity: | normal | Keywords: | |
Cc: | Ryan J Ollos | Trac Release: | 0.11 |
Description
there is no "Syntax Coloring of Source Code" in fullblog.css, I create a patch to add it:
-
fullblog.css
old new 1 1 /* 2 2 ** Styles for the /blog pages and blog items in macros 3 3 */ 4 @import url(../../../chrome/common/css/code.css); 4 5 5 6 .blog #main { 6 7 width: 75%;
Attachments (0)
Change History (6)
comment:1 Changed 16 years ago by
Type: | defect → enhancement |
---|
comment:2 follow-up: 3 Changed 16 years ago by
comment:3 follow-up: 4 Changed 16 years ago by
Replying to osimons:
Sorry, but I cannot replicate this. If I add code to the post, it highlights like it should - both inside the blog and when posts are rendered as macros. Try something like this inside a post:
{{{ #!python class Testing(object): """ My docstring. """ pass }}}Does it not highlight in your Trac? The source rendering processor should add the needed stylesheet - mine adds
pygments/trac.css
. Do you perhaps use a different highlighter?
I use clearsilver, there is no highlight by default when I add code to post.
comment:4 Changed 16 years ago by
Replying to anonymous:
I use clearsilver, there is no highlight by default when I add code to post.
You mean silvercity, I suppose?
Anyway, that starts sounding like a Trac bug I need to look into. The stylesheet should be added as needed, and work for all supported highlighters.
comment:5 Changed 15 years ago by
Cc: | Ryan J Ollos added; anonymous removed |
---|
comment:6 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [9429]) FullBlogPlugin: Adding Trac code.css
stylesheet to all post rendering for correct rendering of inline syntax highlighting.
Fixes #3608. Sorry for the time it took to fix this... :-)
Sorry, but I cannot replicate this. If I add code to the post, it highlights like it should - both inside the blog and when posts are rendered as macros. Try something like this inside a post:
Does it not highlight in your Trac? The source rendering processor should add the needed stylesheet - mine adds
pygments/trac.css
. Do you perhaps use a different highlighter?