You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not know why (didn't studied your code), had some problems when the content had newlines "\n". To fix it changed the "process" function to: public function process() { $args = func_get_args(); $text = array_shift($args); $text = trim(preg_replace('/\s+/', ' ', $text)); // Added this line to this function while(true) { $sc = $this->getShortCodes($text); if (empty($sc)) { break; } $text = $this->processCodes($text, $sc, $args); } return $text; }
As i said, i didn't studie your code, so this is not the best solution. (btw, I used your plugin with tinymce.)
The text was updated successfully, but these errors were encountered:
Actually i dont know. I did not test it. Once I realized I could be '\n' issue I tested this line ($text = trim(preg_replace('/\s+/', ' ', $text));) and solved my problem. By having line break, it automatically shut the tag early. But it seems to be an easy thing to test.
I do not know why (didn't studied your code), had some problems when the content had newlines "\n". To fix it changed the "process" function to:
public function process()
{
$args = func_get_args();
$text = array_shift($args);
$text = trim(preg_replace('/\s+/', ' ', $text)); // Added this line to this function
while(true) {
$sc = $this->getShortCodes($text);
if (empty($sc)) {
break;
}
$text = $this->processCodes($text, $sc, $args);
}
return $text;
}
As i said, i didn't studie your code, so this is not the best solution. (btw, I used your plugin with tinymce.)
The text was updated successfully, but these errors were encountered: