Index: src/aphront/console/plugin/DarkConsoleXHProfPlugin.php =================================================================== --- src/aphront/console/plugin/DarkConsoleXHProfPlugin.php +++ 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 { Index: src/infrastructure/markup/PhabricatorMarkupEngine.php =================================================================== --- src/infrastructure/markup/PhabricatorMarkupEngine.php +++ 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); Index: src/infrastructure/markup/PhabricatorMarkupOneOff.php =================================================================== --- src/infrastructure/markup/PhabricatorMarkupOneOff.php +++ 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) {