Page MenuHomePhabricator

Don't invoke pygmentize to highlight "txt" or "text" files
ClosedPublic

Authored by epriestley on Mar 24 2015, 8:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 3:52 PM
Unknown Object (File)
Wed, Nov 20, 3:30 PM
Unknown Object (File)
Wed, Nov 20, 12:37 PM
Unknown Object (File)
Fri, Nov 15, 6:55 PM
Unknown Object (File)
Mon, Nov 11, 11:05 PM
Unknown Object (File)
Mon, Nov 11, 8:34 PM
Unknown Object (File)
Fri, Nov 8, 7:10 AM
Unknown Object (File)
Sun, Nov 3, 11:44 PM

Details

Summary

Ref T5644. Caught one more of these: we run pygmentize even when we know the file won't be highlighted.

Test Plan

Checked that we don't try to shell out to highlight text files.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Don't invoke pygmentize to highlight "txt" or "text" files.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Mar 24 2015, 8:09 PM

Maybe this should be a config duration option so that installs can customize it?

This revision was automatically updated to reflect the committed changes.

Maybe this should be a config duration option so that installs can customize it?

Not sure what you mean, can you clarify?

Actually maybe this is okay. So I was thinking that an install might want to define additional languages that they don't wish to highlight. But I guess in that case they can just map those file extensions to text.