Cookbook /
CloseBlockOnSameLine
Summary: close block on same line
Version: 1.0
Prerequisites: none
Status: working
Maintainer: gnuzoo
License: GPL
Categories: Uncategorized
Discussion: CloseBlockOnSameLine-Talk
Questions answered by this recipe
How to close a block on the same line
Description
Enter your recipe's description here.
>><< (:div:)(:divend:) by default have to close on a different line. This shows how to do it on the same line.
Installation
Just copy this PHP code to your config.php or your farmconfig.php:
switch ($action) {
case "edit" :
if (! @$_POST['preview']) break ;
case "browse" :
case "print" :
Markup('CloseBlockOnSameLine1', '_begin', '/(\\(:div.*?:\\))(.*?)(\\(:divend:\\))$/i', "$1$2\n$3") ;
Markup('CloseBlockOnSameLine2', '_begin', '/^(>>.+?<<)(.*?)(>><<)$/', "$1$2\n$3") ;
Markup('CloseBlockOnSameLine3', '_begin', '/(\\(:details.*?:\\))(.*?)(\\(:detailsend:\\))$/i', "$1$2\n$3") ;
}
Configuration
Internationalization
The following strings can be translated in an XLPage:
Usage
Notes
This code snippet/HowTo/addon/cookbook/recipe created from PmWiki Talk page https://www.pmwiki.org/wiki/PmWiki/WikiStyles-Talk section "Block on the same line?"
To do / some day / maybe
Change log / Release notes
See also
Contributors
Comments
See discussion at CloseBlockOnSameLine-Talk
User notes : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.