diff --git a/markdown.php b/markdown.php index 4be4c561..cb03d148 100644 --- a/markdown.php +++ b/markdown.php @@ -467,8 +467,8 @@ protected function build($str) { 'fence'=>'/^`{3}\h*(\w+)?.*?[^\n]*\n+(.+?)`{3}[^\n]*'. '(?:\n+|$)/s', 'hr'=>'/^\h*[*_\-](?:\h?[\*_\-]){2,}\h*(?:\n+|$)/', - 'atx'=>'/^\h*(#{1,6})\h?(.+?)\h*(?:#.*)?(?:\n+|$)/', - 'setext'=>'/^\h*(.+?)\h*\n([=\-])+\h*(?:\n+|$)/', + 'atx'=>'/^\h*(#{1,6})\h?(.+?)\h*(?:#.*)?(?:\n+|$)/u', + 'setext'=>'/^\h*(.+?)\h*\n([=\-])+\h*(?:\n+|$)/u', 'li'=>'/^(?:(?:[*+\-]|\d+\.)\h.+?(?:\n+|$)'. '(?:(?: {4}|\t)+.+?(?:\n+|$))*)+/s', 'raw'=>'/^((?:|'.