Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

Last modified 18 years ago

#673 closed defect (fixed)

[merge] change language directive in wiki

Reported by: toni.brkic@… Owned by: Jonas Borgström
Priority: highest Milestone:
Component: wiki system Version: devel
Severity: blocker Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal 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 (1)

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

Download all attachments as: .zip

Change History (5)

by tonib, 20 years ago

Attachment: patch_673.diff added

patch for the ticket

comment:1 by anonymous, 20 years ago

Summary: change language directive in wiki[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 by Jonas Borgström, 20 years ago

Resolution: fixed
Status: newclosed

Applied in [922], thanks!

comment:3 by anonymous, 20 years ago

Priority: normalhighest
Resolution: fixed
Severity: minorblocker
Status: closedreopened
Version: 0.7.1devel

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 by Jonas Borgström, 20 years ago

Resolution: fixed
Status: reopenedclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.