|
Cookbook /
CreoleSummary: Enable Creole markup (wikicreole.org)
Version: 2007-02-15
Prerequisites: 2.2.0-beta24
Status: Stable
Maintainer: Pm
Categories: Markup WikiConversion
Questions answered by this recipe
DescriptionPmWiki 2.2.0 (beta24) is now distributed with a module for Creole markups. To enable Creole, simply add the following line to a local customization:
include_once('scripts/creole.php');
In addition to enabling Creole markup, the module also switches the graphical edit buttons to use creole sequences instead of PmWiki's default sequences. NotesTo experiment with Creole markups, use either this page or the Creole-Sandbox. CommentsI know that the Creole standard is still in the early stages, but are you planning on having it eventually be the default markup method in PmWiki? It seems just as easy to implement Creole as it does the current markup method. Plus, some of the Creole methods make more sense, such as slashes and asterisks for italic and bold. Since PmWiki 2.2 is going to be a fairly major upgrade, why not use the latest version of Creole by default with the 2.2 stable release. Most of the basic features in Creole seem solid already. It would make more sense to implement such a big change in markup with all of the other big changes in 2.2, because people upgrading to it will make the leap in one go, rather than making several large leaps. Plus, 2.2's long beta cycle would make a good environment to test everything out in, especially with Cookbook compatibility. The problem with a total switch is one of converting existing sites which may have a lot of pages of markup. And I don't necessarily agree with all of Creole's markup choices (and might not agree with more choices they make in the future). So, I don't want to commit to saying "Creole by default". That said, I would be amenable to switching the defaults for strong/emphasized text to be slashes/asterisks while continuing to support the '''...''' and ''..'' forms for backward compatibility. --Pm
pmwiki-2.2.0-beta26's You're correct, this should be the include line. I've been waffling between enabling it via include versus enabling it via a configuration variable. --Pm
I vote to use include style, unless Creole is meant to be fairly integral rather than a supplemental add on. For this matter, could Creole not live in the Cookbook rather than the distribution files? -- Feral February 06, 2007, at 08:39 AM
There seems to be a bug interpreting WikiCreole's syntax. When using preformatted text ('3x{' and '3x}'), newlines are not being outputted. If I use multiple lines inside a preformatted block, the output is presented in a single line. SergioNunes? March 01, 2007 Since Pmwiki (v2.2.0-beta65) does not use the creole markup below (proposed by Feral) they are a bug with some external link. For example:
I've seen some other bugs, where HTTPS scheme where not handled by urlapprove (but I'm not sure if it does not come from my config)... It seems that the markup proposed by Feral fix this bug. Dfolio November 19, 2007 at 10:51 PM Just in case it is of any value to anyone I have ended up with this style of markup for my preferred (creol)
Markup("//", ">urllink", "/\/\/(.+?)\/\//", "<i>$1</i>"); // //Italic//, After urllink so that this works after a bareurl.
Markup("__", "inline", "/__(.+?)__/", "<u>$1</u>"); // __Underline__
Markup("**", "inline", "/([^*])\*\*(.+?)\*\*/", "$1<b>$2</b>"); // **Bold**
Markup("^**", "<^*", "/^\*\*([^*]+?)\*\*/", "<b>$1</b>"); // [Feral:058/07@05:02] Special case; bold at start of line.
I have NO IDEA if this is a good way to go about it, however I have found it to be more error free than the presented method in creole.php, this said apart from general usage this little snippet might be handy: * Bold-Italic-Underline: [@**//__text__//**= __text__ * Bold-Underline-Italic: @] I wish you all the best AND happiness too! (= Feral March 20, 2007, at 07:59 PM
I found this to be even more error free than the default and the one proposed by Feral:
Markup('**', 'inline', '/^\\*\\*(?!\\*)(?>(.+?)\\*\\*)(?!\\S)|(?<!^|\\*)\\*\\*(.+?)\\*\\*/', '<strong>$1$2</strong>');
Wiki Creole markup has just reached the final the final v1.0 spec (2007-Jul-04). Is there a chance to see this fully implemented in PmWiki ? When switching to Creole in PMWiki 2.2 beta57, Headings GUI buttons (H2 and H3 enabled in config.php) are always returning '!!' and '!!!' But when I type the Creole markup by hand, it works fine. So I've looked at creole.php and there seems to be nothing related to the additionnal H2 and H3 GUI buttons. Could this be fixed please ? Thanks :) There is a small aspect of Creole 1.0 which is not supported it seems. See here See AlsoContributors |