Page MenuHomePhabricator

D19234.id.diff
No OneTemporary

D19234.id.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
Sat, Mar 29, 12:12 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7394207
Default Alt Text
D19234.id.diff (1 KB)

Event Timeline