Homec4science

Allow renderering Remarkup to text

Authored by Jakub Vrana <jakub@vrana.cz> on Mar 21 2013, 16:49.

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

Committed
Jakub Vrana <jakub@vrana.cz>Mar 21 2013, 16:49
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUbd4a21319a91: Increase the severity of "use of undefined constant" to exception
Branches
Unknown
Tags
Unknown

Event Timeline

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