diff --git a/src/markup/engine/remarkup/blockrule/PhutilRemarkupNoteBlockRule.php b/src/markup/engine/remarkup/blockrule/PhutilRemarkupNoteBlockRule.php index e80f3e1..4c33173 100644 --- a/src/markup/engine/remarkup/blockrule/PhutilRemarkupNoteBlockRule.php +++ b/src/markup/engine/remarkup/blockrule/PhutilRemarkupNoteBlockRule.php @@ -2,10 +2,13 @@ final class PhutilRemarkupNoteBlockRule extends PhutilRemarkupBlockRule { + public $additionalData = ""; + public function getMatchingLineCount(array $lines, $cursor) { $num_lines = 0; - if (preg_match($this->getRegEx(), $lines[$cursor])) { + $matches = array(); + if (preg_match($this->getRegEx(), $lines[$cursor], $matches)) { $num_lines++; $cursor++; @@ -19,6 +22,14 @@ final class PhutilRemarkupNoteBlockRule extends PhutilRemarkupBlockRule { } } + //extract type of Note + if ($num_lines>0) + if (idx($matches, 'showword')) { + $this->additionalData = $matches['showword']; + } else { + $this->additionalData = $matches['hideword']; + } + return $num_lines; } @@ -104,6 +115,7 @@ final class PhutilRemarkupNoteBlockRule extends PhutilRemarkupBlockRule { 'NOTE', 'IMPORTANT', 'WARNING', + 'SYNTAX' ); foreach ($words as $k => $word) {