Home GnuPG

Allow renderering Remarkup to text
c1d330c5b77bUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Allow renderering Remarkup to text

Summary:
This will be useful mainly for D123 and {D123} in text e-mails.
I've consider also other approaches:

  1. Convert the rendered HTML to text - we lose some information when converting Remarkup to HTML, e.g. whether ## or ` was used.
  2. Return the Remarkup intact, e.g. in simple table or lists (after applying inline rules) - tables and lists formatted by computer usually look better than the ones from users.
  3. Create a separate text renderer - HTML and text renderers share lots of regular expressions and code so splitting them would create more complexity.

The mode is a bitmask to allow something like self::MODE_TITLE | self::MODE_LINK in future.

Test Plan: Old and new unit tests.

Reviewers: epriestley, edward

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2617

Differential Revision: https://secure.phabricator.com/D5365

Details

Provenance
Jakub Vrana <jakub@vrana.cz>Authored on Mar 21 2013, 4:49 PM
Parents
rPHUTILbd4a21319a91: Increase the severity of "use of undefined constant" to exception
Branches
Unknown
Tags
Unknown

Event Timeline

Jakub Vrana <jakub@vrana.cz> committed rPHUTILc1d330c5b77b: Allow renderering Remarkup to text (authored by Jakub Vrana <jakub@vrana.cz>).Mar 21 2013, 4:49 PM