improved the help page + added markdown style html formatting processor)

This commit is contained in:
2017-09-05 21:45:12 +02:00
parent 6aa4747d3e
commit d2b2b89593
6 changed files with 382 additions and 242 deletions
+5 -1
View File
@@ -43,8 +43,12 @@ if (file_exists($_pf)) {
// special symbols
$str = str_replace('\,', ' ', $str);
$str = preg_replace('/(?<=\w)~(?=\w)/', '&nbsp;', $str);
$str = preg_replace('/(?<=[^ ])~(?=[^ ])/', '&nbsp;', $str);
$str = preg_replace('/(?<!\w)`([^ `][^`]*?[^ `]|[^ `])`(?!\w)/', '<code>$1</code>', $str);
$str = preg_replace('/(?<!\w)_([^ _][^_]*?[^ _]|[^ _])_(?!\w)/', '<i>$1</i>', $str);
$str = preg_replace('/(?<!\w)\*([^ *][^*]*?[^ *]|[^ *])\*(?!\w)/', '<b>$1</b>', $str);
$str = preg_replace("/\s*(\\\\\\\\)[\n \t]+/", '<br>', $str);
include_str($str);
} else {
echo "404";