Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F82431
D7583.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D7583.diff
View Options
diff --git a/src/aphront/console/plugin/DarkConsoleXHProfPlugin.php b/src/aphront/console/plugin/DarkConsoleXHProfPlugin.php
--- a/src/aphront/console/plugin/DarkConsoleXHProfPlugin.php
+++ b/src/aphront/console/plugin/DarkConsoleXHProfPlugin.php
@@ -87,7 +87,7 @@
'target' => '_blank',
),
pht('Profile Permalink'));
- $result = phutil_tag(
+ $result[] = phutil_tag(
'iframe',
array('src' => "/xhprof/profile/$run/?frame=true"));
} else {
diff --git a/src/infrastructure/markup/PhabricatorMarkupEngine.php b/src/infrastructure/markup/PhabricatorMarkupEngine.php
--- a/src/infrastructure/markup/PhabricatorMarkupEngine.php
+++ b/src/infrastructure/markup/PhabricatorMarkupEngine.php
@@ -202,13 +202,16 @@
PhabricatorMarkupInterface $object,
$field) {
- $custom = array_merge(
- self::loadCustomInlineRules(),
- self::loadCustomBlockRules());
-
- $custom = mpull($custom, 'getRuleVersion', null);
- ksort($custom);
- $custom = PhabricatorHash::digestForIndex(serialize($custom));
+ static $custom;
+ if ($custom === null) {
+ $custom = array_merge(
+ self::loadCustomInlineRules(),
+ self::loadCustomBlockRules());
+
+ $custom = mpull($custom, 'getRuleVersion', null);
+ ksort($custom);
+ $custom = PhabricatorHash::digestForIndex(serialize($custom));
+ }
return $object->getMarkupFieldKey($field).'@'.$this->version.'@'.$custom;
}
@@ -364,6 +367,10 @@
case 'default':
$engine = self::newMarkupEngine(array());
break;
+ case 'nolinebreaks':
+ $engine = self::newMarkupEngine(array());
+ $engine->setConfig('preserve-linebreaks', false);
+ break;
case 'diviner':
$engine = self::newMarkupEngine(array());
$engine->setConfig('preserve-linebreaks', false);
diff --git a/src/infrastructure/markup/PhabricatorMarkupOneOff.php b/src/infrastructure/markup/PhabricatorMarkupOneOff.php
--- a/src/infrastructure/markup/PhabricatorMarkupOneOff.php
+++ b/src/infrastructure/markup/PhabricatorMarkupOneOff.php
@@ -36,10 +36,11 @@
}
public function newMarkupEngine($field) {
- return PhabricatorMarkupEngine::newMarkupEngine(
- array(
- 'preserve-linebreaks' => $this->preserveLinebreaks,
- ));
+ if ($this->preserveLinebreaks) {
+ return PhabricatorMarkupEngine::getEngine();
+ } else {
+ return PhabricatorMarkupEngine::getEngine('nolinebreaks');
+ }
}
public function getMarkupText($field) {
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/bv/zu/n5yaxfotrjbyvrcp
Default Alt Text
D7583.diff (2 KB)
Attached To
Mode
D7583: Cache the computation of the custom block component of the markup key
Attached
Detach File
Event Timeline
Log In to Comment