Page MenuHomePhabricator

D19234.diff
No OneTemporary

D19234.diff

diff --git a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php
--- a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php
+++ b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php
@@ -279,6 +279,15 @@
return $matches[0];
}
+ // If we're rendering a table of contents, just render the raw input.
+ // This could perhaps be handled more gracefully but it seems unusual to
+ // put something like "{P123}" in a header and it's not obvious what users
+ // expect? See T8845.
+ $engine = $this->getEngine();
+ if ($engine->getState('toc')) {
+ return $matches[0];
+ }
+
return $this->markupObject(array(
'type' => 'embed',
'id' => $matches[1],
@@ -292,6 +301,12 @@
return $matches[0];
}
+ // If we're rendering a table of contents, just render the monogram.
+ $engine = $this->getEngine();
+ if ($engine->getState('toc')) {
+ return $matches[0];
+ }
+
return $this->markupObject(array(
'type' => 'ref',
'id' => $matches[1],

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 10, 3:29 AM (2 m, 27 s ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7394207
Default Alt Text
D19234.diff (1 KB)

Event Timeline