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)
Sat, Dec 7, 8:07 AM
Unknown Object (File)
Fri, Dec 6, 9:08 AM
Unknown Object (File)
Wed, Nov 27, 10:27 PM
Unknown Object (File)
Nov 20 2024, 3:52 PM
Unknown Object (File)
Nov 20 2024, 3:30 PM
Unknown Object (File)
Nov 20 2024, 12:37 PM
Unknown Object (File)
Nov 15 2024, 6:55 PM
Unknown Object (File)
Nov 11 2024, 11:05 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.