Skip to content

Commit

Permalink
regex
Browse files Browse the repository at this point in the history
  • Loading branch information
mauretto78 committed Mar 4, 2022
1 parent 9566804 commit 28b3189
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Filters/Snails.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Snails extends AbstractHandler
*/
public function transform( $segment )
{
preg_match_all( '/@@[^<>\s%]+?@@|(?<!{)@[^<>\s@]+?@/', $segment, $html, PREG_SET_ORDER );
preg_match_all( '/@@[^<>\s]+?@@|@[^<>\s@]+?@/', $segment, $html, PREG_SET_ORDER );
foreach ( $html as $pos => $snail_variable ) {
//check if inside twig variable there is a tag because in this case shouldn't replace the content with PH tag
if( !strstr($snail_variable[0], Constants::GTPLACEHOLDER) ){
Expand Down

0 comments on commit 28b3189

Please sign in to comment.