markdown.inc.php

Top > Plugin > markdown.inc.php
First Edition. 02/13/2006
Last Modified. 07/03/2006

Port Markdown Text Markup Syntax to PukiWiki

SummaryPort Markdown Text Markup Syntax to PukiWiki
Compatible VersionsVerified with 1.4.5-u2-i18n
Developersonots
First Edition02/13/2006
Last Modified07/03/2006
LicenseGPL

This page is written in both English and Japanese.

Table of Contents

Abstract

This plugin enables to write parts or whole of a Pukiwiki page within Markdown syntax. I will not use this plugin by myself, but I created this plugin to introduce that it is easily realized to write Pukiwiki more than Pukiwiki syntax.

Technical Details

The mechanism is simple, this plugin just passes the text of argument to PHP Markdown and returns the generated HTML code.

However, Markdown passes through HTML tags directly, therefore, texts are passed into Markdown engine after HTML tags are html encoded in usual pages.

On pages which are frozen or edit_authed or when whole system is working under PKWK_READONLY mode, HTML tags passed into Markdown directly, so you can use HTML tags as ../html.inc.php. Both $edit_auth and PKWK_READONLY can be configured on pukiwiki.ini.php.

Related

How to use

I assume you are enabling multiline plugin arguments as Pukiwiki Plus.

#markdown{{
ページ全体をこのように囲めば・・・
If whole page was enclosed like this....

*   Red
*   Green
*   Blue
}}

ページ全体をこのように囲めば・・・ If whole page was enclosed like this....

  • Red
  • Green
  • Blue

Please refer official Markdown site about syntax.

Download

First, please download PHP Markdown and place the file at your plugin directory.

プラグインで複数行引数を使えるようにしておきます*1。pukiwiki.ini.php

-define('PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK', 1); // 1 = Disabled
+define('PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK', 0); // 1 = Disabled

Save from right-click, and put into plugin directory.

markdown.inc.php

What's new viewcvs

FileDateWhat's new
markdown.inc.php.207/03/2006Enabled to use HTML tags on edit_authed pages
markdown.inc.php.102/13/2006First Edition

Compatibility Check

Please join us to check compatibilities.

Compatible

Selection Vote
PHP4 1
PHP5 1
1.3.7 0
1.4.3 0
1.4.4 0
1.4.5_1 0
1.4.6 0
1.4.7 1
1.4.5plus-eucjp 0
1.4.6plus-u1-eucjp 0
1.4.6plus-u2-eucjp 0
1.4.5plus-u2-i18n 1
1.4.6plus-u1-i18n 1
1.4.6plus-u2-i18n 1
1.4.7plus-i18n 2
1.4.7plus-u2-i18n 1

Incompatible

Selection Vote
PHP4 0
PHP5 0
1.3.7 0
1.4.3 0
1.4.4 0
1.4.5_1 0
1.4.6 0
1.4.7 0
1.4.5plus-eucjp 0
1.4.6plus-u1-eucjp 0
1.4.6plus-u2-eucjp 0
1.4.5plus-u2-i18n 0
1.4.6plus-u1-i18n 0
1.4.6plus-u2-i18n 0
1.4.7plus-i18n 0
1.4.7plus-u2-i18n 1


*1 すぐにデフォルトになると思っていたのですが、全然変更されませんねぇ…