First version of a generic edit syntax Plugin. This is based on the ideas outlined in
MediaWikiSyntaxPlugin. Watch out, this is alpha quality, not recommended for public TWikis.
I am wondering if I can get some help:
- The Mediawiki regex topic needs to be enhanced to convert tables
- Secure the Plugin: Make the regex evaluation safe
- Create more converters (MoinMoin, DokuWiki, ...)
--
PeterThoeny - 09 Jul 2006
I'd rather fill in a
declarative table of the syntax for each wiki, and have TWiki work out the regex.
e.g.
For
NoteStudio:
Syntax |
NoteStudio |
h1 |
+ |
h2 |
++ |
For Confluence:
Syntax |
Confluence |
h1 |
h1. |
h2 |
h2. |
For
MediaWiki:
Syntax |
MediaWiki |
h1 |
= |
h2 |
== |
For TWiki:
Syntax |
TML |
h1 |
---+ |
h2 |
---++ |
rather than a set of regexs to & from TWiki:
T2X |
s/\-\-\-\+/\+/ |
X2T |
s/ \+/\-\-\-\+/ |
Even if this would not work 100% I'd rather list a set of "regexs that finish the job" than everything as a regex from the outset.
--
MartinCleaver - 10 Jul 2006
A declarative interface for the converter would be easier to use, however I think this does not work well for two reasons:
- The declaration must also account for new lines (e.g. bullets only at the beginning of the line) and for complex syntax (such as Mediawiki tables that span several lines per table row)
- Complexity of automatically translating the declarations to regex
Since the translation regexes are intended for programmers and not for endusers I find the current approach a balance on usability and ease of implemenation.
--
PeterThoeny - 10 Jul 2006