#673 closed defect (fixed)
[merge] change language directive in wiki
Reported by: | 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)
Change History (5)
by , 20 years ago
Attachment: | patch_673.diff added |
---|
comment:1 by , 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:3 by , 20 years ago
Priority: | normal → highest |
---|---|
Resolution: | fixed |
Severity: | minor → blocker |
Status: | closed → reopened |
Version: | 0.7.1 → 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 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Ok, sorry about that. I forgot to remove a debug output. Should work now.
patch for the ticket