Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/view/PhabricatorSearchResultView.php
| Show First 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | foreach ($patterns as $pattern) { | ||||
| $all_matches[$match_offset] = max( | $all_matches[$match_offset] = max( | ||||
| $all_matches[$match_offset], | $all_matches[$match_offset], | ||||
| strlen($match_text)); | strlen($match_text)); | ||||
| } | } | ||||
| } | } | ||||
| // Go through the string one display glyph at a time. If a glyph starts | // Go through the string one display glyph at a time. If a glyph starts | ||||
| // on a highlighted byte position, turn on highlighting for the nubmer | // on a highlighted byte position, turn on highlighting for the number | ||||
amckinley: This is the only "nubmer" typo in the whole code base! | |||||
| // of matching bytes. If a query searches for "e" and the document contains | // of matching bytes. If a query searches for "e" and the document contains | ||||
| // an "e" followed by a bunch of combining marks, this will correctly | // an "e" followed by a bunch of combining marks, this will correctly | ||||
| // highlight the entire glyph. | // highlight the entire glyph. | ||||
| $parts = array(); | $parts = array(); | ||||
| $highlight = 0; | $highlight = 0; | ||||
| $offset = 0; | $offset = 0; | ||||
| foreach (phutil_utf8v_combined($str) as $character) { | foreach (phutil_utf8v_combined($str) as $character) { | ||||
| $length = strlen($character); | $length = strlen($character); | ||||
| ▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines | |||||
This is the only "nubmer" typo in the whole code base!