Skip to content

Commit

Permalink
Fixed comment alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
lux committed Aug 6, 2024
1 parent f15efcb commit 30cd3f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Slimdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Slimdown {
public static $rules = array (
'/```(.*?)```/s' => self::class .'::code_parse', // code blocks
'/\n(#+)\s+(.*)/' => self::class .'::header', // headers
'/\!\[([^\[]*?)\]\(([^\)]+)\)/' => self::class .'::img', // images
'/\!\[([^\[]*?)\]\(([^\)]+)\)/' => self::class .'::img', // images
'/\[([^\[]+)\]\(([^\)]+)\)/' => self::class .'::link', // links
'/(\*\*|__)(?=(?:(?:[^`]*`[^`\r\n]*`)*[^`]*$))(?![^\/<]*>.*<\/.+>)(.*?)\1/' => '<strong>\2</strong>', // bold
'/(\*|_)(?=(?:(?:[^`]*`[^`\r\n]*`)*[^`]*$))(?![^\/<]*>.*<\/.+>)(.*?)\1/' => '<em>\2</em>', // emphasis
Expand All @@ -34,10 +34,10 @@ class Slimdown {
'/`(.*?)`/' => '<code>\1</code>', // inline code
'/(\n[\*|\-] )\[x\]/' => '\1<input type=\'checkbox\' disabled checked>', // checkbox checked
'/(\n[\*|\-] )\[\ \]/' => '\1<input type=\'checkbox\' disabled>', // checkbox unchecked
'/\n[\*|\-] (.*)/' => self::class .'::ul_list', // ul lists
'/\n[\*|\-] (.*)/' => self::class .'::ul_list', // ul lists
'/\n[0-9]+\.(.*)/' => self::class .'::ol_list', // ol lists
'/\n(&gt;|\>)(.*)/' => self::class .'::blockquote', // blockquotes
'/\n-{5,}/' => "\n<hr>", // horizontal rule
'/\n-{5,}/' => "\n<hr>", // horizontal rule
'/\n([^\n]+)\n/' => self::class .'::para', // add paragraphs
'/<\/ul>\s?<ul>/' => '', // fix extra ul
'/<\/ol>\s?<ol>/' => '', // fix extra ol
Expand Down

0 comments on commit 30cd3f0

Please sign in to comment.