SourceCodeHorizontalLines

Summary: Allow horizontal lines made of dashes ("-------") in PMWiki page source code
Version: 1.3
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 separate pieces of source code in a PMWiki Page. Currently PMWiki converts a series of 4 or more dashes into an HTML horizontal line. This recipe converts 5 or more dashes into a comment, but exactly 4 dashes will still work for making an HTML horizontal line.

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 your cookbook directory

In your config.php enter:

include_once("cookbook/SCHLines.php");

or in your farmconfig.php enter:

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

Notes

Release Notes

  • 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.