Skip to content

Commit

Permalink
Merge pull request #4541 from mdeweerd/fix/deprecated
Browse files Browse the repository at this point in the history
minor Fix deprecations: curly string access
  • Loading branch information
marcovtwout authored Dec 18, 2023
2 parents cff207c + a7d1a13 commit 567dc7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/commands/markdown/MarkdownParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function _doHeaders_callback_setext($matches)
{
if ($matches[3] == '-' && preg_match('{^- }', $matches[1]))
return $matches[0];
$level = $matches[3]{0} == '=' ? 1 : 2;
$level = $matches[3][0] == '=' ? 1 : 2;
$text = $this->runSpanGamut($matches[1]);
$attr = $this->doHeaderId($text);
$block = "<h$level$attr>".$text."</h$level>";
Expand Down
2 changes: 1 addition & 1 deletion docs/viewer/components/MarkdownParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function _doHeaders_callback_setext($matches)
{
if ($matches[3] == '-' && preg_match('{^- }', $matches[1]))
return $matches[0];
$level = $matches[3]{0} == '=' ? 1 : 2;
$level = $matches[3][0] == '=' ? 1 : 2;
$text = $this->runSpanGamut($matches[1]);
$attr = $this->doHeaderId($text);
$block = "<h$level$attr>".$text."</h$level>";
Expand Down

0 comments on commit 567dc7a

Please sign in to comment.