diff --git a/build/index.php b/build/index.php index f10c937..ba6ccfb 100644 --- a/build/index.php +++ b/build/index.php @@ -3706,6 +3706,8 @@ register_module([ "description" => "An upgraded parser based on Emanuil Rusev's Parsedown Extra PHP library (https://github.com/erusev/parsedown-extra), which is licensed MIT. Please be careful, as this module adds a some weight to your installation, and also requires write access to the disk on first load.", "id" => "parser-parsedown", "code" => function() { + global $settings; + $parser = new PeppermintParsedown(); $parser->setInternalLinkBase("?page=%s"); add_parser("parsedown", function($source) use ($parser) { @@ -3713,6 +3715,17 @@ register_module([ return $result; }); + + add_help_section("20-parser-default", "Editor Syntax", + "

$settings->sitename's editor uses an extended version of Parsedown to render pages, which is a fantastic open source Github flavoured markdown parser. You can find a quick reference guide on Github flavoured markdown here by adam-p, or if you prefer a book Mastering Markdown by KB is a good read, and free too!

+

Extra Syntax

+

$settings->sitename's editor also supports some extra custom syntax, some of which is inspired by Mediawiki. + + + + + +
Type thisTo get thisComments
[[Internal link]]Internal LinkAn internal link.
[[Display Text|Internal link]]Display TextAn internal link with some display text.
![Alt text](http://example.com/path/to/image.png | 256x256 | right)Alt textAn image floating to the right of the page that fits inside a 256px x 256px box, preserving aspect ratio.
"); } ]); diff --git a/module_index.json b/module_index.json index 53e9a99..d0f37c1 100644 --- a/module_index.json +++ b/module_index.json @@ -194,7 +194,7 @@ "author": "Johnny Broadway, Emanuil Rusev & Starbeamrainbowlabs", "description": "An upgraded parser based on Emanuil Rusev's Parsedown Extra PHP library (https:\/\/github.com\/erusev\/parsedown-extra), which is licensed MIT. Please be careful, as this module adds a some weight to your installation, and also requires write access to the disk on first load.", "id": "parser-parsedown", - "lastupdate": 1457796287, + "lastupdate": 1457807249, "optional": false } ] \ No newline at end of file diff --git a/modules/parser-parsedown.php b/modules/parser-parsedown.php index 379d484..eb612fa 100644 --- a/modules/parser-parsedown.php +++ b/modules/parser-parsedown.php @@ -6,6 +6,8 @@ register_module([ "description" => "An upgraded parser based on Emanuil Rusev's Parsedown Extra PHP library (https://github.com/erusev/parsedown-extra), which is licensed MIT. Please be careful, as this module adds a some weight to your installation, and also requires write access to the disk on first load.", "id" => "parser-parsedown", "code" => function() { + global $settings; + $parser = new PeppermintParsedown(); $parser->setInternalLinkBase("?page=%s"); add_parser("parsedown", function($source) use ($parser) { @@ -13,6 +15,17 @@ register_module([ return $result; }); + + add_help_section("20-parser-default", "Editor Syntax", + "

$settings->sitename's editor uses an extended version of Parsedown to render pages, which is a fantastic open source Github flavoured markdown parser. You can find a quick reference guide on Github flavoured markdown here by adam-p, or if you prefer a book Mastering Markdown by KB is a good read, and free too!

+

Extra Syntax

+

$settings->sitename's editor also supports some extra custom syntax, some of which is inspired by Mediawiki. + + + + + +
Type thisTo get thisComments
[[Internal link]]Internal LinkAn internal link.
[[Display Text|Internal link]]Display TextAn internal link with some display text.
![Alt text](http://example.com/path/to/image.png | 256x256 | right)Alt textAn image floating to the right of the page that fits inside a 256px x 256px box, preserving aspect ratio.
"); } ]);