Commit d38499b3 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'diff-line-highlighting-fix' into 'master'

Fix line diff side-by-side line highlighting

## What does this MR do?

Fixes line highlighting in diff side-by-side view from working correctly.

The JS was looking for a class, but the class doesn't exist & instead it was a data attribute.

## Screenshots (if relevant)

![Screen_Shot_2016-09-13_at_10.26.15](/uploads/7aca730efb14d7bd6bad2a8712fe39d2/Screen_Shot_2016-09-13_at_10.26.15.png)

See merge request !6316
parents 35bed03c 2eb2cbe6
...@@ -232,10 +232,10 @@ ...@@ -232,10 +232,10 @@
$('.hll').removeClass('hll'); $('.hll').removeClass('hll');
locationHash = window.location.hash; locationHash = window.location.hash;
if (locationHash !== '') { if (locationHash !== '') {
hashClassString = "." + (locationHash.replace('#', '')); dataLineString = '[data-line-code="' + locationHash.replace('#', '') + '"]';
$diffLine = $(locationHash + ":not(.match)", $('#diffs')); $diffLine = $(locationHash + ":not(.match)", $('#diffs'));
if (!$diffLine.is('tr')) { if (!$diffLine.is('tr')) {
$diffLine = $('#diffs').find("td" + locationHash + ", td" + hashClassString); $diffLine = $('#diffs').find("td" + locationHash + ", td" + dataLineString);
} else { } else {
$diffLine = $diffLine.find('td'); $diffLine = $diffLine.find('td');
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment