SourceCodeHorizontalLines

Summary: Allow horizontal lines made of dashes ("-------") in PMWiki page source code
Version: 2.0
Prerequisites: none
Status: Working
Maintainer:
Categories: Markup Tables
Downloads: SCHLines.phpΔ

Questions answered by this recipe

  • I like to put horizontal lines into code to visually separate sections. How can I do this in PMWiki?

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.

Description

This allows you to use dashes to visually separate sections of text while editing a PMWiki Page.
Currently PMWiki converts a series of 4 or more dashes into an HTML horizontal rule "<hr />"
This recipe converts 5 or more dashes, but exactly 4 dashes still make a HTML horizontal rule.

Code that looks like this:

[table border=1]
[row]
[!c]animal
[!c]food
[row]
[c]cat
[c]catfood
[row]
[]dog
[]dogfood
[row]
[r]bird
[r]birdfood
[tableend]

can look like this:

---------------------
---------------------
[table border=1]
---------------------
[row]
[!c]animal
[!c]food
---------------------
[row]
[c]cat
[c]catfood
---------------------
[row]
[]dog
[]dogfood
---------------------
[row]
[r]bird
[r]birdfood
---------------------
[tableend]
---------------------
---------------------

Installation

Copy SCHLines.phpΔ to a cookbook directory

In a config.php enter:

include_once("cookbook/SCHLines.php");

or in a farmconfig.php enter:

include_once("$FarmD/cookbook/SCHLines.php");

Notes

You can allow white space before and after the line by setting a variable in the local/config.php.

  $SCHLinesAllowWhitespace = true ;

Release Notes

  • Version: 2.0 - New option to allow white space before and after the lines
  • Version: 1.2 - Markup removes lines instead of making it a comment. Executes only for specific actions.
  • Version: 1.1 - Add RecipeInfo
  • Version: Initial Release

Comments

See Also

Contributors

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.