Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F2747706
1-blockrule-syntax.patch
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Apr 19, 3:14 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Tue, Apr 21, 3:14 AM (1 d, 12 h)
Engine
blob
Format
Raw Data
Handle
250547
Attached To
rXR Xreate
1-blockrule-syntax.patch
View Options
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) {
Event Timeline
Log In to Comment