Browse Source

fix ns expression

main
ghost 10 months ago
parent
commit
1780bd6754
  1. 6
      src/Twig/AppExtension.php

6
src/Twig/AppExtension.php

@ -215,14 +215,14 @@ class AppExtension extends AbstractExtension
): string ): string
{ {
// Search not filtered namespaces // 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; return $text;
} }
foreach ($matches[1] as $namespace) foreach ($matches[2] as $namespace)
{ {
// Replace with _CLITOR_IS_ value // Replace with _CLITOR_IS_ value
if ($meta = $this->_clitor($namespace)) if ($meta = $this->_clitor($namespace))

Loading…
Cancel
Save