grab whitespace before and after br tag
This commit is contained in:
parent
431363fedd
commit
5f4d2a3bb5
|
@ -8,6 +8,8 @@ class GSGreenTextPlugin extends Plugin
|
|||
{
|
||||
const VERSION = '0.0.1';
|
||||
|
||||
const LINE_SEP = "/\s*<br\s*?\/?>\s*/";
|
||||
|
||||
public function onEndShowStyles(Action $action)
|
||||
{
|
||||
$action->style(".greentext { color: green; }");
|
||||
|
@ -20,7 +22,7 @@ class GSGreenTextPlugin extends Plugin
|
|||
|
||||
function onStartNoticeSave(&$notice)
|
||||
{
|
||||
$sepnotice = preg_split("/<br\s*?\/?>\r?\n*/", $notice->rendered, -1);
|
||||
$sepnotice = preg_split(self::LINE_SEP, $notice->rendered, -1);
|
||||
|
||||
foreach($sepnotice as &$sep)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue