Skip to content
Snippets Groups Projects
Commit 7a2fd816 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets Committed by Marin Jankovski
Browse files

Merge branch 'rs-issue-1690' into 'master'

Better handle label references that aren't actually references

Fixes #1690

See merge request !705
parent dac18e77
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -84,11 +84,11 @@ def render_colored_label(label)
#
# Returns a Hash.
def label_params(id, name)
if id > 0
{ id: id }
else
if name
# TODO (rspeicher): Don't strip single quotes if we decide to only use double quotes for surrounding.
{ name: name.tr('\'"', '') }
else
{ id: id }
end
end
end
Loading
Loading
Loading
Loading
@@ -149,5 +149,12 @@ module Gitlab::Markdown
end
end
end
describe 'edge cases' do
it 'gracefully handles non-references matching the pattern' do
exp = act = '(format nil "~0f" 3.0) ; 3.0'
expect(filter(act).to_html).to eq exp
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment