|
1 | | -<?xml version="1.0" encoding="utf-8" ?> |
2 | 1 | <Configuration> |
3 | 2 | <Controls> |
4 | 3 | <Control> |
|
13 | 12 | <ScriptBlock> |
14 | 13 | try { |
15 | 14 | $rev = if ($_.FileMatch.File.Commit.Oid) { |
16 | | - $commitUrl = "$($_.FileMatch.Repository.Url)@$($_.FileMatch.File.Commit.Oid)" |
17 | 15 | # AbbreviatedOid causes panics if queried for search results |
18 | 16 | "@`e[02m$($_.FileMatch.File.Commit.Oid.Substring(0, 7))`e[0m" |
19 | 17 | } else { |
|
110 | 108 | </TableColumnItem> |
111 | 109 | <TableColumnItem> |
112 | 110 | <ScriptBlock> |
113 | | - # TODO figure out what's wrong with github.com/sourcegraph/src > .gitignore "error" |
| 111 | + $result = $_ |
114 | 112 | try { |
115 | 113 | # Highlight match ranges |
116 | 114 | $preview = $_.Preview |
117 | 115 | $out = "" |
118 | 116 | $start = 0 |
119 | 117 | foreach ($offsetAndLength in $_.OffsetAndLengths) { |
120 | | - $offset = $offsetAndLength[0] |
121 | | - $length = $offsetAndLength[1] |
| 118 | + $offset, $length = $offsetAndLength |
122 | 119 | $out += $preview.Substring($start, $offset - $start) + "`e[43m`e[30m" + $preview.Substring($offset, $length) + "`e[0m" |
123 | 120 | $start += $offset + $length |
124 | 121 | } |
|
128 | 125 | } |
129 | 126 | $out |
130 | 127 | } catch { |
131 | | - Write-Warning "Error highlighting matches: " + ($_ | Out-String) |
132 | | - $_.Preview |
| 128 | + Write-Warning -Message ("Error highlighting matches: " + ($_ | Out-String)) |
| 129 | + $result.Preview |
133 | 130 | } |
134 | 131 | </ScriptBlock> |
135 | 132 | </TableColumnItem> |
|
218 | 215 | 'CONSTRUCTOR' { "`e[35m" } |
219 | 216 | 'FUNCTION' { "`e[35m" } |
220 | 217 | 'CLASS' { "`e[38;5;220;m" } |
| 218 | + 'ENUM' { "`e[38;5;220;m" } |
221 | 219 | 'KEY' { "`e[38;5;220;m" } |
222 | 220 | 'STRUCT' { "`e[38;5;220;m" } |
223 | 221 | 'TYPEPAREMETER' { "`e[38;5;38;m" } |
224 | 222 | 'VARIABLE' { "`e[38;5;38;m" } |
| 223 | + 'ENUMMEMBER' { "`e[38;5;38;m" } |
225 | 224 | 'PROPERTY' { "`e[38;5;110;m" } |
226 | 225 | 'FIELD' { "`e[38;5;110;m" } |
227 | 226 | 'PACKAGE' { "`e[38;5;208;m" } |
|
0 commit comments