Recent Changes - Search:

PmWiki

pmwiki.org

CustomMarkup-Talk

If you want a markup to produce something that is interpreted by wiki be careful. E.g. if I you want a style, I start by coding

  • Markup('{red}', '_begin', '/{red}/', '>>red<<');

However, PmWiki will show the text >>red<< instead of interpreting the style and changing the color. This is because the markup handling styles looks for &lt;&lt; .... &gt;&gt; . Thus, what I need is

  • Markup('{red}', '_begin', '/{red}/', '&lt;&lt;red&gt;&gt;');

To make sure the ouput of a markup is understood, one better reads the definition of the consumer, in this case in stdmarkup.php.


parallel use of the " <br> " symbol, to break lines

If you want to use the " <br> " symbol, to break lines,
like in .html pages
(parallel to the " \\ " symbol),
put the following in your config.php file:

## using <br> , to break lines.
##
## optional, if you may have <br clear='all'>
## Markup('<br clear=all>','inline','/&lt;br\\s+clear=([\'"]?)all\\1\\s*\\/?&gt;/i',"<br clear='all' />");
##
## One thing to know is that the symbols "<" and ">" are encoded in the page 
## source text as "&lt;" and "&gt;" and in custom markup the encoded ones should 
## be used.
##
Markup('<br>','inline','/&lt;br\\s*\\/?&gt;/i',"<br />");


This is a talk page for improving PmWiki.CustomMarkup.

Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 11:08 AM