|
143 | 143 | </dl>
|
144 | 144 | </div>
|
145 | 145 | </div>
|
| 146 | + |
146 | 147 | <% if finding["source_code_file"].to_s.strip != "" %>
|
147 | 148 | <div class="row">
|
148 | 149 | <div class="large-8 columns">
|
|
199 | 200 | </div>
|
200 | 201 | </div>
|
201 | 202 | <dl class="dl-horizontal">
|
202 |
| - <div class="panel" style="word-wrap: break-word; font-family: monospace;""> |
| 203 | + <div class="panel" style="word-wrap: break-word; font-family: monospace;"> |
203 | 204 | <% if finding["line_number"].present? and finding["line_number"].to_i == 0 %>
|
204 | 205 |
|
205 | 206 | <% else %>
|
|
221 | 222 | </dl>
|
222 | 223 | <% end %>
|
223 | 224 |
|
224 |
| - <% unless (["curl", "sketchy", "depot"] & finding.try(:[], "source")).empty? %> |
| 225 | + <% unless (["curl", "sketchy", "depot"] && finding.try(:[], "source")).empty? %> |
225 | 226 | <div class="row">
|
226 | 227 | <div class="large-12 columns">
|
227 | 228 | <% if finding.try(:[], "match_location") == "headers" and finding.try(:[], "code_fragment") != nil%>
|
|
248 | 249 | <% (finding["after"]||[]).each do |i| %>
|
249 | 250 | </br>
|
250 | 251 | <%= i[1].to_s.rstrip %>
|
| 252 | + |
| 253 | + |
251 | 254 | <% end %>
|
252 | 255 | </div>
|
253 | 256 | </dl>
|
| 257 | + |
| 258 | + <% elsif finding.try(:[], "match_location") == "file" and finding.try(:[], "code_fragment") != nil%> |
| 259 | + <div class="row"> |
| 260 | + <div class="large-8 columns"> |
| 261 | + <dl class="dl-horizontal"> |
| 262 | + <dt>File Match</dt> |
| 263 | + <dd><%= "#{finding["term"]}" %></dd> |
| 264 | + </dl> |
| 265 | + </div> |
| 266 | + </div> |
| 267 | + <dl class="dl-horizontal"> |
| 268 | + <div class="panel" style="word-wrap: break-word; font-family: monospace; white-space:pre-wrap;"> |
| 269 | + <b><%= highlight(h(simple_format(finding["code_fragment"].to_s.gsub('\n', '<br/>'))), h(finding["term"])) %></b> |
| 270 | + </div> |
| 271 | + </dl> |
254 | 272 | <!-- CUSTOMIZE THIS FOR PATHS AND BOTH,
|
255 | 273 | THINK ABOUT TERMS WE MAY NEED TO -->
|
256 | 274 | <% elsif finding.try(:[], "match_location") == "both" and finding.try(:[], "code_fragment") != nil%>
|
|
0 commit comments