Homec4science

Add a simple language guesser for shells scripts and other things we can…

Authored by epriestley <git@epriestley.com> on Feb 15 2012, 20:29.

Description

Add a simple language guesser for shells scripts and other things we can reasonably infer the language of

Summary:
If we can't figure out the language a file is written in from path/filename
rules, try to look for telltale markers in the file itself.

This provides a few very simple rules, but they should have no false positives
and cover most reasonable cases.

Test Plan:
Pasted files with no identifying filename into Paste, got reasonable
highlighting.

Reviewers: btrahan, bill, nh

Reviewed By: nh

CC: aran, epriestley

Maniphest Tasks: T513

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

Details

Committed
epriestley <git@epriestley.com>Feb 15 2012, 20:29
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUa9a9370dfc5c: Add Filesystem::getMimeType()
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU7765d513949b: Add a simple language guesser for shells scripts and other things we can… (authored by epriestley <git@epriestley.com>).Feb 15 2012, 20:29