Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3995887
1-blockrules.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
Wed, Jul 8, 6:22 AM
Size
2 KB
Mime Type
text/x-diff
Expires
Fri, Jul 10, 6:22 AM (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
271794
Attached To
rXR Xreate
1-blockrules.patch
View Options
diff --git a/src/markup/engine/PhutilRemarkupEngine.php b/src/markup/engine/PhutilRemarkupEngine.php
index d883154..9a44c2f 100644
--- a/src/markup/engine/PhutilRemarkupEngine.php
+++ b/src/markup/engine/PhutilRemarkupEngine.php
@@ -123,6 +123,7 @@ final class PhutilRemarkupEngine extends PhutilMarkupEngine {
$blocks = $this->splitTextIntoBlocks($text);
+
$output = array();
foreach ($blocks as $block) {
$output[] = $this->markupBlock($block);
@@ -133,15 +134,16 @@ final class PhutilRemarkupEngine extends PhutilMarkupEngine {
$this->storage = null;
$metadata = $this->metadata;
-
return array(
'output' => $output,
'storage' => $map,
'metadata' => $metadata,
);
+
+
}
- private function splitTextIntoBlocks($text, $depth = 0) {
+ public function splitTextIntoBlocks($text, $depth = 0) {
// Apply basic block and paragraph normalization to the text. NOTE: We don't
// strip trailing whitespace because it is semantic in some contexts,
// notably inlined diffs that the author intends to show as a code block.
@@ -164,7 +166,7 @@ final class PhutilRemarkupEngine extends PhutilMarkupEngine {
$curr_block = array(
'start' => $cursor,
'num_lines' => $num_lines,
- 'rule' => $block_rule,
+ 'rule' => clone $block_rule,
'is_empty' => self::isEmptyBlock($text, $cursor, $num_lines),
'children' => array(),
);
diff --git a/src/markup/engine/remarkup/blockrule/PhutilRemarkupHeaderBlockRule.php b/src/markup/engine/remarkup/blockrule/PhutilRemarkupHeaderBlockRule.php
index cbcb143..6e91488 100644
--- a/src/markup/engine/remarkup/blockrule/PhutilRemarkupHeaderBlockRule.php
+++ b/src/markup/engine/remarkup/blockrule/PhutilRemarkupHeaderBlockRule.php
@@ -16,13 +16,13 @@ final class PhutilRemarkupHeaderBlockRule extends PhutilRemarkupBlockRule {
}
}
- if ($num_lines) {
- $cursor++;
- while (isset($lines[$cursor]) && !strlen(trim($lines[$cursor]))) {
- $num_lines++;
- $cursor++;
- }
- }
+// if ($num_lines) {
+// $cursor++;
+// while (isset($lines[$cursor]) && !strlen(trim($lines[$cursor]))) {
+// $num_lines++;
+// $cursor++;
+// }
+// }
return $num_lines;
}
Event Timeline
Log In to Comment