Modify

Opened 7 years ago

Closed 6 years ago

#1944 closed defect (duplicate)

Doesn't highlight unless you have a session

Reported by: athomas Owned by: mgood
Priority: normal Component: TracPygmentsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

This patch fixed it on TracHacks:

  • __init__.py

    old new  
    130130 
    131131    def post_process_request(self, req, template, content_type): 
    132132        if not getattr(req, '_no_pygments_stylesheet', False): 
     133            if req.session: 
     134                style = req.session.get('pygments_style', self.default_style) 
     135            else: 
     136                style = self.default_style 
    133137            add_link(req, 'stylesheet', self.env.href('pygments', '%s.css' % 
    134                      req.session.get('pygments_style', self.default_style))) 
     138                     style)) 
    135139        return template, content_type 
    136140 
    137141    # IRequestHandler implementation 

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by athomas

  • Summary changed from Doesn't render unless you have a session to Doesn't highlight unless you have a session

comment:2 Changed 6 years ago by giel

This is a duplicate of #1336.

comment:3 Changed 6 years ago by giel

  • Resolution set to duplicate
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from mgood. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.