Skip to content

Commit

Permalink
fix ns expression
Browse files Browse the repository at this point in the history
  • Loading branch information
ghost committed Feb 14, 2024
1 parent 2b3a5ca commit 1780bd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Twig/AppExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ public function namespaceToMarkdown(
): string
{
// Search not filtered namespaces
if (preg_match_all('/(^(?!\/)N[A-z0-9]{33})/', $text, $matches))
if (preg_match_all('/(^|\s)(N[A-z0-9]{33})/', $text, $matches))
{
if (empty($matches[1]))
if (empty($matches[2]))
{
return $text;
}

foreach ($matches[1] as $namespace)
foreach ($matches[2] as $namespace)
{
// Replace with _CLITOR_IS_ value
if ($meta = $this->_clitor($namespace))
Expand Down

0 comments on commit 1780bd6

Please sign in to comment.