Modify

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  
    11/*
    22** Styles for the /blog pages and blog items in macros
    33*/
     4@import url(../../../chrome/common/css/code.css);
    45
    56.blog #main {
    67    width: 75%;

Attachments (0)

Change History (6)

comment:1 Changed 16 years ago by anonymous

Type: defectenhancement

comment:2 Changed 16 years ago by 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?

comment:3 in reply to:  2 ; Changed 16 years ago by anonymous

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 in reply to:  3 Changed 16 years ago by osimons

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 Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed

comment:6 Changed 14 years ago by osimons

Resolution: fixed
Status: newclosed

(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... :-)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.