Opened 18 years ago
Closed 15 years ago
#4356 closed enhancement (fixed)
WikiCreole markup
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | low | Milestone: | 0.12 |
Component: | wiki system | Version: | 0.9.6 |
Severity: | major | Keywords: | creole |
Cc: | ilias@…, dfraser | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Hi, I just installed Trac and my development team would like to use the WikiCreole (www.wikicreole.org) markup in our project wiki. Are there any plans to make a parser for Creole? If not, would you please be able to develop it? Full specs can be found at http://www.wikicreole.org/wiki/Creole0.3 Thank you!
—Chuck Smith
Attachments (3)
Change History (21)
comment:1 by , 18 years ago
Keywords: | plugin added |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
comment:2 by , 18 years ago
The Creole syntax seems pretty similar to what Trac already supports. The th:WikiGoodiesPlugin adds a bold and italics syntax similar to the one used in Creole, so you could use that as a basis for a plugin adding Creole-style bold and italics.
follow-up: 5 comment:3 by , 18 years ago
Milestone: | → 0.11 |
---|---|
Resolution: | wontfix |
Status: | closed → reopened |
Yes, but that plugin only adds *bold*
and /italic/
for single words. That could be extended to multiple words, but not across lines, as that spec says.
I've just gone through WikiCreole again, and I definitely think there are some good things that we can lift up from there:
- use "|" as another separator in labeled links (links)
- … hm, well, that's about it ;)
For supporting **bold text**
and //italic text//
, the current workaround is simply to go and patch the Formatter, and edit those tokens appropriately, e.g.
-
formatter.py
151 151 # Some constants used for clarifying the Wiki regexps: 152 152 153 153 BOLDITALIC_TOKEN = "'''''" 154 BOLD_TOKEN = " '''"155 ITALIC_TOKEN = " ''"154 BOLD_TOKEN = "**" 155 ITALIC_TOKEN = "//" 156 156 UNDERLINE_TOKEN = "__" 157 157 STRIKE_TOKEN = "~~" 158 158 SUBSCRIPT_TOKEN = ",,"
It might even be interesting to see if we could have this notation in addition to the existing one.
comment:4 by , 18 years ago
Keywords: | plugin removed |
---|---|
Severity: | minor → normal |
… and support for line breaks in ticket descriptions and comments, for the reasons given there.
The links using double brackets [[... link ...]]
could probably be supported as well, as it should be easy to distinguish them from macro calls.
comment:5 by , 18 years ago
Replying to cboos:
For supporting
**bold text**
and//italic text//
, the current workaround is
…
-
formatter.py
151 151 # Some constants used for clarifying the Wiki regexps: 152 152 153 153 BOLDITALIC_TOKEN = "'''''" 154 BOLD_TOKEN = "'''"155 ITALIC_TOKEN = " ''"154 BOLD_TOKEN = r"\*\*" 155 ITALIC_TOKEN = "//" 156 156 UNDERLINE_TOKEN = "__" 157 157 STRIKE_TOKEN = "~~" 158 158 SUBSCRIPT_TOKEN = ",,"
of course :P)
by , 18 years ago
Attachment: | trac_wiki_creole-r4428.patch added |
---|
Adapt Trac WikiFormatting to be more compatible with WikiCreole
comment:6 by , 18 years ago
In attachment:trac_wiki_creole-r4428.patch:
- Bold And Italics compatibility
//
and**
can be used as italic and bold markup, in addition to the existing ones''
and'''
- they mix by pairs, e.g. you can't end a
''
by a//
.
- Links Internal And External compatibility
- "|" can be used as a separator between the link and the label
- simple square brackets or double square brackets can be used for links (
[...]
or[[...]]
)
All the existing wiki unit-tests still pass, so I think it's a good sign that this additions won't disturb existing Trac Wiki pages.
comment:7 by , 18 years ago
Cc: | added |
---|
comment:8 by , 18 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:9 by , 18 years ago
Milestone: | 0.11 → 0.12 |
---|
WikiEngine refactoring and related fixes postponed. At that point, the (full) WikiCreole support could be easily added as a plugin.
follow-up: 13 comment:12 by , 15 years ago
There is now such a plugin at th:wiki:WikiCreoleRendererPlugin
comment:13 by , 15 years ago
Milestone: | next-major-0.1X → 0.12 |
---|
Replying to dfraser:
There is now such a plugin at th:wiki:WikiCreoleRendererPlugin
Fine, but that only supports Creole itself, and there you can't use the more advanced Trac's WikiFormatting and most importantly, you can't use the TracLinks…
So I see in the comment:6 approach more useful, to have the regular Trac Wiki markup be a superset of the WikiCreole markup, or at least, move in that direction.
by , 15 years ago
Attachment: | trac_wiki_creole-r9337.patch added |
---|
Patch updated to current trunk, improved [[...]]
link support.
by , 15 years ago
Attachment: | trac_wiki_creole-r9337.2.patch added |
---|
new version, adds support for forced line breaks (\\
)
follow-up: 17 comment:16 by , 15 years ago
The patch seems to work fine, but I have to admit that the wiki parser and formatter code is still somewhat… opaque to me, so I can't really claim to have done a good review of the code. Still, +1.
Using the pipe as a separator between a link and its label is nice, as it avoids having to quote the link if it has spaces.
One question: why use <strong>
for Trac-style bold, and <b>
for WikiCreole bold? Same question for italic and <i>
/ <em>
. Why not use the same element for both styles?
comment:17 by , 15 years ago
Replying to rblank:
The patch seems to work fine, but I have to admit that the wiki parser and formatter code is still somewhat… opaque to me, so I can't really claim to have done a good review of the code. Still, +1.
Using the pipe as a separator between a link and its label is nice, as it avoids having to quote the link if it has spaces.
Yes, and it makes it easier to deal with non-CamelCase names, [[0.12/]]
is more convenient to type than ["0.12/"]
.
One question: why use
<strong>
for Trac-style bold, and<b>
for WikiCreole bold? Same question for italic and<i>
/<em>
. Why not use the same element for both styles?
This is an implementation quirk due to the way the simple_tag_handler
works. I'll see what I can do.
comment:18 by , 15 years ago
Keywords: | creole added |
---|---|
Resolution: | → fixed |
Severity: | normal → major |
Status: | new → closed |
Patch queue committed in [9428:9431], which brings basic support for WikiCreole in Trac 0.12.
I've some good hope that in 0.13 we can get even better support (single pipe table syntax #6630, embedding links {{image.png}}
, …).
There is no plan to change the Wiki syntax.
You may want to write a plugin to support an alternative syntax (see th:wiki:WikiStart#Request-a-Hack)