Precode

Summary: General utility block markup for displaying codes with syntax highlighting
Version: 2.1.0-20140314
Prerequisites: See Below
Status: Active/Stable
Maintainer: VKrishn
Categories: Markup PHP55 layout
Users: (view / edit)
Discussion: Precode-Talk

Precode - general utility block markup for displaying codes

sample1 | sample2 | sample3 | sample4 | sample5 | sample6

Description

Precode - general utility block markup for displaying codes

Notes

Some of the potential uses of Precode

  1. Long rfc style text can be input and referenced by line.
  2. Can be used by syntax-highlighting tools like Highlight.js, GeSHi with all its features.

About Precode

Some issues Precode addresses:

  1. Add line number to preformatted code/text.
  2. The line counter/number can be reset.
  3. Choice for list-styles
    disc | circle | square | decimal | decimal-leading-zero | lower-roman |
    upper-roman | lower-greek | lower-latin | upper-latin | armenian |
    georgian| lower-alpha | upper-alpha | none | inherit
  4. Line numbers can be custom styled.

Installation

Configuration

Usage

  1. Adapters (included)
    1. chilli
    2. geshi
    3. highlightjs
    4. prettify
    5. prismjs
    6. rainbow
    7. sourceblock.geshi
    8. syntaxlove.syntaxhighlighter

Notes

Release notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See also

Contributors

Demo:

  • Please see links at the beginning of this page. see above

Requirements
Package/AppsMinimumLast test
Php4 >= 4.3.05.5.4
PmWiki2.2.4+2.2.58

Files/Download

Changelog

March 14, 2014
==================
Precode v2.1.0
------------------
 -- Make compatible with php 5.5x.
 -- Add adapters rainbow, prismjs.
 -- Minor bug fix.

March 15, 2013
==================
Precode v2.0.5
------------------
 -- Minor bug fix.
 -- Maintenance release.

March 05, 2013
==================
Precode v2.0.4
------------------
 -- Minor bug fix.
 -- Maintenance release.

February 23, 2013
==================
Precode v2.0.3
------------------
 -- Adapter.prettify lang class fix.
 -- Minor bug fix.
 -- Updated test files.

January 16, 2013
==================
Precode v2.0.2
------------------
 -- Cleaned presenter js.
 -- Combined/minified js files.
 -- Added variable to toggle highlighter/presenter.
 -- Updated adapters and tests.

August 14, 2012
==================
Precode v2.0.1
------------------
 -- Minor bug fix.
 -- Refined adapters.

July 28, 2012
==================
Precode v2.0.1-beta-3
----------------------
 -- Minor bug fix.
 -- Refined adapters.

July 25, 2012
==================
Precode v2.0.1-beta-2
----------------------
 -- Minor bug fix.
 -- Refined adapters.

July 21, 2012
==================
Precode v2.0.1-beta-1
----------------------
 -- Minor bug fix.
 -- Improved classreset.
 -- Improved js linenum(Precode).
 -- Addon js Precode.Highlight.
 -- Addon js Precode.CodePresenter.

July 14, 2012
==================
Precode v2.0.0
------------------
 -- Version jump.
 -- Improved classreset.

July 12, 2012
==================
Precode v1.2.0
------------------
 -- Minor bug fix.
 -- Add step (increment by) for line numbers.
 -- Updated document.
 -- Add suffix and prefix to linenum.
 -- Add limit to linereset.
 -- Add classreset.

July 10, 2012
==================
Precode v1.1.0
------------------
 -- Minor bug fix.
 -- Added linenum.js (full source).
 -- Compressed js code.

July 9, 2012
==================
Precode v1.0.0
------------------
 -- Initial release.

See also

Cookbook /
Ape  Easy embedding of videos, maps and more in wiki pages (Stable)
Beautifier  Perform syntax highlighting for source code displayed on wiki pages
CodeMirror  An enhanced page editor for PmWiki (Release Candidate)
Gists  Markup to allow easy embedding of syntax-highlighted github gists (active)
PITS  The PmWiki Issue Tracking System (Beta)
PmPygment  Display code highlighting using Python pygment (Stable)
SourceBlock  Source code syntax highlighter for PmWiki 2.x using GeSHi (Stable)
Syntaxlove  Syntax highlighting with good look and cool JavaScript-effects
ZCode  Extract and highlight source code files from 7z, TAR, ZIP, or RAR archives (Experimental)

Author

  • V.Krishn

Comments

See discussion at Precode-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.