Homec4science

Write a simple parser to mangle `pygmentize` output to use email-friendly style…

Authored by epriestley <git@epriestley.com> on May 5 2016, 02:52.

Description

Write a simple parser to mangle pygmentize output to use email-friendly style attributes

Summary:
Ref T9790. This mangles pygmentize output so it does <span style="..."> instead of <span class="...">.

It doesn't use a regular expression, although it probably could.

I believe this is safe for all inputs, but it doesn't really matter: we'll only feed it safe inputs anyway, and it's only going to be used for email which we can't really do anything unsafe in.

Test Plan: Added unit tests; ran unit tests.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9790

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

Details

Committed
epriestley <git@epriestley.com>May 5 2016, 11:48
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU0709cd5cfc26: Add unpack support to xhpast
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU47fb41229851: Write a simple parser to mangle `pygmentize` output to use email-friendly style… (authored by epriestley <git@epriestley.com>).May 5 2016, 11:48