Edgewall Software
Modify

Ticket #673 (closed defect: fixed)

Opened 8 years ago

Last modified 6 years ago

[merge] change language directive in wiki

Reported by: toni.brkic@… Owned by: jonas
Priority: highest Milestone:
Component: wiki system Version: devel
Severity: blocker Keywords:
Cc:
Release Notes:
API Changes:

Description

Hi,

when you want to write in another language and syntax highlight
one writes

#!!cpp

For example.

I would suggest that one writes the mime text instead e.g

#!text/c++src

This would make WikiFormatter?.py simpler. And you would support all
languages that you have in enscript silvercity.

If you add support for more languages there would be one less insance where
code needed to change. Now it is neccessary to change WikiFormatter?.py and
mimeviewer/*.py

Attachments

patch_673.diff (2.3 KB) - added by tonib 8 years ago.
patch for the ticket

Download all attachments as: .zip

Change History

Changed 8 years ago by tonib

patch for the ticket

comment:1 Changed 8 years ago by anonymous

  • Summary changed from change language directive in wiki to [merge] change language directive in wiki

Hi,

I created a patch for the ticket.

So now it is possible to write

{{{
#!text/html
<h1> text <\h1>
}}}

And get syntax highlightning in a wiki page.
To see what mimetypes that can be used look in the list in Mimeview.py

comment:2 Changed 8 years ago by jonas

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

Applied in [922], thanks!

comment:3 Changed 8 years ago by anonymous

  • Priority changed from normal to highest
  • Resolution fixed deleted
  • Severity changed from minor to blocker
  • Status changed from closed to reopened
  • Version changed from 0.7.1 to devel

After updating trac and trying this example:

{{{
#!text/html
<h1> text </h1>
}}}

my server gives me this error:

malformed header from script. Bad header=<module 'trac.mimeviewers.silv: trac.cgi

comment:4 Changed 8 years ago by jonas

  • Resolution set to fixed
  • Status changed from reopened to closed

Ok, sorry about that. I forgot to remove a debug output. Should work now.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.