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)
Fri, Mar 15, 3:20 PM
Unknown Object (File)
Feb 11 2024, 11:25 AM
Unknown Object (File)
Feb 4 2024, 11:34 AM
Unknown Object (File)
Feb 1 2024, 7:10 PM
Unknown Object (File)
Dec 27 2023, 6:07 AM
Unknown Object (File)
Dec 21 2023, 1:07 PM
Unknown Object (File)
Dec 17 2023, 5:59 AM
Unknown Object (File)
Dec 7 2023, 2:30 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.