Ticket #4356 (closed enhancement: fixed)
WikiCreole markup
| Reported by: | chuckssmith@… | Owned by: | cboos |
|---|---|---|---|
| Priority: | low | Milestone: | 0.12 |
| Component: | wiki system | Version: | 0.9.6 |
| Severity: | major | Keywords: | creole |
| Cc: | ilias@…, dfraser |
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
Change History
comment:1 Changed 4 years ago by eblot
- Keywords plugin added
- Status changed from new to closed
- Resolution set to wontfix
comment:2 Changed 4 years ago by mgood
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.
comment:3 follow-up: ↓ 5 Changed 4 years ago by cboos
- Status changed from closed to reopened
- Resolution wontfix deleted
- Milestone set to 0.11
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 Changed 4 years ago by cboos
- Keywords plugin removed
- Severity changed from minor to 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 in reply to: ↑ 3 Changed 4 years ago by anonymous
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)
Changed 4 years ago by cboos
- attachment trac_wiki_creole-r4428.patch added
Adapt Trac WikiFormatting to be more compatible with WikiCreole
comment:6 Changed 4 years ago by cboos
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:8 Changed 4 years ago by cboos
- Owner changed from jonas to cboos
- Status changed from reopened to new
comment:9 Changed 3 years ago by cboos
- Milestone changed from 0.11 to 0.12
WikiEngine refactoring and related fixes postponed. At that point, the (full) WikiCreole support could be easily added as a plugin.
comment:10 Changed 2 years ago by fcorreia@…
just listening...
comment:11 Changed 8 months ago by dfraser
- Cc dfraser added
There's a request for a plugin at th:#2863
comment:12 follow-up: ↓ 13 Changed 8 months ago by dfraser
There is now such a plugin at th:wiki:WikiCreoleRendererPlugin
comment:13 in reply to: ↑ 12 Changed 7 months ago by cboos
- Milestone changed from next-major-0.1X to 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.
Changed 6 months ago by cboos
- attachment trac_wiki_creole-r9337.patch added
Patch updated to current trunk, improved [[...]] link support.
Changed 6 months ago by cboos
- attachment trac_wiki_creole-r9337.2.patch added
new version, adds support for forced line breaks (\\)
comment:14 Changed 5 months ago by cboos
Any comment on this one trac_wiki_creole-r9337.2.patch?
comment:15 Changed 5 months ago by rblank
Oops, missed that one. I'll test it this evening.
comment:16 follow-up: ↓ 17 Changed 5 months ago by 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.
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 in reply to: ↑ 16 Changed 5 months ago by cboos
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 Changed 5 months ago by cboos
- Keywords creole added
- Status changed from new to closed
- Resolution set to fixed
- Severity changed from normal to major
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)