diff --git a/index.php b/index.php index 166193c..230fa0c 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,4 @@ - "^^^"); } elseif ("#" == $line1) { preg_match("/^(#{1,3})\s*(.+)?/", $line, $matches); - yield array("mode" => $matches[1], "title" => trim(@$matches[2])); + yield array("mode" => $matches[1], "title" => trim($matches[2]??"")); } elseif ("=>" == $line2) { preg_match("/^=>\s*([^\s]+)(?:\s+(.*))?$/", $line, $matches); - yield array("mode" => "=>", "link" => trim(@$matches[1]), "text" => trim(@$matches[2])); + yield array("mode" => "=>", "link" => trim($matches[1]??""), "text" => trim($matches[2]??"")); } elseif ("```" == $line3) { preg_match("/^```\s*(.*)$/", $line, $matches); $current = array("mode" => "```", "alt" => trim($matches[1]), "texts" => array()); diff --git a/lib-html.inc.php b/lib-html.inc.php index 6069a6f..ec04522 100644 --- a/lib-html.inc.php +++ b/lib-html.inc.php @@ -1,4 +1,4 @@ -