Summary: `,` -> `, ` is currently highlighted wrong.
Test Plan:
Looked at patches of these errors:
- License linter
- `0+0`
- `0,0`
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D5093
$text_lines = explode("\n", $text);
$text_length = count($text_lines);
- if ($text) {
+ $intraline = ($text != '' || $start || !preg_match('/\n$/', $patch));
+
+ if ($intraline) {
for (; $cursor < $line_num + $text_length; $cursor++) {
$chevron = ($cursor == $line_num);
// We may not have any data if, e.g., the old file does not exist.
$patched = phutil_console_format('##%s##', $patch_line);
- if ($text) {
+ if ($intraline) {
$patched = substr_replace(
$line_data[$line_num],
$patched,