From 2e426509b6c7bd63cdaedbaebfd47fa69354fefa Mon Sep 17 00:00:00 2001 From: Sebastian Titz Date: Thu, 26 Aug 2021 09:17:58 +0200 Subject: [PATCH] remove markdown --- _func.php | 2 +- markdown.php | 84 ---------------------------------------------------- 2 files changed, 1 insertion(+), 85 deletions(-) delete mode 100644 markdown.php diff --git a/_func.php b/_func.php index 9fdc381..f37372f 100644 --- a/_func.php +++ b/_func.php @@ -6,5 +6,5 @@ include_once ('string.php'); include_once ('numbers.php'); include_once ('mail.php'); include_once ('debug.php'); -include_once ('markdown.php'); +// include_once ('markdown.php'); ?> \ No newline at end of file diff --git a/markdown.php b/markdown.php deleted file mode 100644 index 0d90701..0000000 --- a/markdown.php +++ /dev/null @@ -1,84 +0,0 @@ -'; - $lv = 0; - $str = explode ( "\n", str_replace ( "\r\n", "\n", $str ) ); - // var_dump ( $str ); - foreach ( $str as $t ) { - // echo '
' . $t . '
'; - $t = preg_replace_callback ( '/\[\[([^\]]*)\]\]/m', '_md_link_replacer', $t ); - $nlv = 0; - if (startsWith ( $t, '**** ' )) { - // echo - 1; - $t = substr ( $t, 5 ); - $nlv = 4; - } - if (startsWith ( $t, '*** ' )) { - // echo - 2; - $t = substr ( $t, 4 ); - $nlv = 3; - } - if (startsWith ( $t, '** ' )) { - // echo - 3; - $t = substr ( $t, 3 ); - $nlv = 2; - } - if (startsWith ( $t, '* ' )) { - // echo - 4; - $t = substr ( $t, 2 ); - $nlv = 1; - } - if ($lv != $nlv) { - while ( $lv < $nlv ) { - // echo '-5 (' . $lv . '-' . $nlv . ')'; - $text .= ''; - $lv --; - } - } - if (startsWith ( $t, '!!!!! ' )) { - $t = '
' . substr ( $t, 6 ) . '
'; - } - if (startsWith ( $t, '!!!! ' )) { - $t = '

' . substr ( $t, 5 ) . '

'; - } - if (startsWith ( $t, '!!! ' )) { - $t = '

' . substr ( $t, 4 ) . '

'; - } - if (startsWith ( $t, '!! ' )) { - $t = '

' . substr ( $t, 3 ) . '

'; - } - if (startsWith ( $t, '! ' )) { - $t = '

' . substr ( $t, 2 ) . '

'; - } - if ($lv == 0) { - if ($t == '') { - $text .= '

'; - } else { - $text .= $t; - } - } else { - $text .= '

  • ' . $t . '
  • '; - } - // var_dump ( $t ); - } - while ( $lv > 0 ) { - $text .= ''; - $lv --; - } - $text .= '

    '; - return $text; -} -function _md_link_replacer($in) { - // var_dump ( $in ); - $in = explode ( '|', $in [1], 2 ); - - return '' . (isset ( $in [1] ) ? $in [1] : $in [0]) . ''; -} -?> \ No newline at end of file