Commit 2e66d4ca authored by Douwe Maan's avatar Douwe Maan Committed by Winnie Hellmann
Browse files

Merge branch 'fix-conflict-highlighting' into 'master'

Fix conflict highlighting

See merge request gitlab-org/gitlab-ce!15463

(cherry picked from commit 202ab62874bb3d828ab48017550660d461e8cf6b)

64a9e53b Fix conflict highlighting
parent 67ec6408088e
......@@ -994,10 +994,6 @@ def ls_files(ref)
raw_repository.ls_files(actual_ref)
end
def gitattribute(path, name)
raw_repository.attributes(path)[name]
end
def copy_gitattributes(ref)
actual_ref = ref || root_ref
begin
......
......@@ -985,6 +985,10 @@ def attributes(path)
@attributes.attributes(path)
end
def gitattribute(path, name)
attributes(path)[name]
end
def languages(ref = nil)
Gitlab::GitalyClient.migrate(:commit_languages) do |is_enabled|
if is_enabled
......
......@@ -84,6 +84,13 @@ def html_to_text(html)
expect(line.text).to eq(html_to_text(line.rich_text))
end
end
# This spec will break if Rouge's highlighting changes, but we need to
# ensure that the lines are actually highlighted.
it 'highlights the lines correctly' do
expect(conflict_file.lines.first.rich_text)
.to eq("<span id=\"LC1\" class=\"line\" lang=\"ruby\"><span class=\"k\">module</span> <span class=\"nn\">Gitlab</span></span>\n")
end
end
describe '#sections' do
......
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