Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15336917
D19234.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19234.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D19234: Render object monograms and embedding references more gracefully when building a Remarkup table of contents
Attached
Detach File
Event Timeline
Log In to Comment