4 Multiple other markup plugins implement features by running a regex
5 on the whole source of a Wiki page. This may sometimes interfer with
6 content inside page blocks (like <code> or <html>).
7 If this plugin however is loaded, all old-style markup plugins instead
8 run on the Wiki text page parts only, and further won't clash in other
9 parts. This may be little slower.
11 include() this plugin AFTER any markup plugins, which you think may
14 include("plugins/markup/foreign_stuff.php");
15 include("plugins/markup/an_older_plugin.php");
17 include("plugins/markup/fix_source_mangling.php");
19 Plugins, which you believe won't cause harm to a wiki pages source
20 ares, can be loaded AFTER _this_ plugin.
24 #-- store current ["format_source"] plugin list, and clean it up
25 $ewiki_plugins["singleblock_fmt_src"] = $ewiki_plugins["format_source"];
26 $ewiki_plugins["format_source"] = array();
28 #-- register ours instead (for all real Wiki text blocks)
29 $ewiki_plugins["block"]["core"][] = "ewiki_format_block_wiki_text_source_mangling";
32 #-- calls source code mangling plugins on current block
33 function ewiki_format_block_wiki_text_source_mangling(&$c, &$in, &$ooo, &$s) {
35 global $ewiki_plugins;
37 if ($pf_a = $ewiki_plugins["singleblock_fmt_src"]) {
38 foreach ($pf_a as $pf) {