HomePhabricator

When highlighting source, catch "python" for the PHP parser
f434f57578ddUnpublished

Unpublished Commit · Learn More

Publishing Disabled: All publishing is disabled for this repository.

Description

When highlighting source, catch "python" for the PHP parser

Summary:
See PHI1065. Normally, Python files are called ".py" and we end up with the lexer coded as "py" by the time we get here, but if you "Highlight As..." and select "Python" we can end up here with "python". (Probably also if you name a file "something.python", although this is very unusual.)

Catch both "py" and "python" for our highlighter.

T3626 should eventually standardize and moot this, but since this patch is only a quarter of a line long it seems reasonable until then.

Test Plan: Added a phlog(), verified we now hit the first-party highlighter with "Highlight As... > Python".

Reviewers: amckinley

Reviewed By: amckinley

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

Details

Provenance
epriestleyAuthored on Feb 28 2019, 8:54 PM
Parents
rPHUTILa2bd64606d99: Add "phutil_describe_type()" and clean up a few obscure things in "libphutil/"
Branches
Unknown
Tags
Unknown
ChangeId
None