Process Remarkup in text and HTML email bodies appropriately
Summary: Ref T6343, adding HTMLMailMode to remarkup, and most objects should now be processed and appear pretty in emails.
Test Plan: Add a comment to a Maniphest task containing a mention of an object like '{T1}' or 'T1'. Emails should show a styled version of the object similar to how the object looks in the context of the Maniphest task in the UI.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: chad, Korvin, epriestley
Maniphest Tasks: T6343, T2617
Differential Revision: https://secure.phabricator.com/D10859
This commit is contained in:
@@ -29,9 +29,12 @@ final class PhrictionRemarkupRule extends PhutilRemarkupRule {
|
||||
$slug = PhrictionDocument::getSlugURI($slug);
|
||||
$href = (string)id(new PhutilURI($slug))->setFragment($fragment);
|
||||
|
||||
$text_mode = $this->getEngine()->isTextMode();
|
||||
$mail_mode = $this->getEngine()->isHTMLMailMode();
|
||||
|
||||
if ($this->getEngine()->getState('toc')) {
|
||||
$text = $name;
|
||||
} else if ($this->getEngine()->isTextMode()) {
|
||||
} else if ($text_mode || $mail_mode) {
|
||||
return PhabricatorEnv::getProductionURI($href);
|
||||
} else {
|
||||
$text = $this->newTag(
|
||||
|
||||
Reference in New Issue
Block a user