Home GnuPG

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

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

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

Provenance
epriestley <git@epriestley.com>Authored on May 5 2016, 2:52 AM
Parents
rPHUTIL0709cd5cfc26: Add unpack support to xhpast
Branches
Unknown
Tags
Unknown

Event Timeline