Read about our upcoming Code of Conduct on this issue

Commit 65081a57 authored by Reuben Pereira's avatar Reuben Pereira
Browse files

Remove the restriction preventing project references with text adjacent to the > character

parent 6a84b2a4e5c8
......@@ -465,14 +465,12 @@ def reference_postfix_escaped
# Pattern used to extract `namespace/project>` project references from text.
# (?!\w) matches any non-word character.
# '>' or its escaped form ('>') are checked for because '>' is sometimes escaped
# when the reference comes from an external source.
def markdown_reference_pattern
......@@ -24,9 +24,9 @@ def get_reference(project)
expect(reference_filter(act).to_html).to eq(CGI.escapeHTML(exp))
it 'ignores references with text after the > sign' do
exp = act = "Hey #{reference}foo"
expect(reference_filter(act).to_html).to eq CGI.escapeHTML(exp)
it 'allows references with text after the > character' do
doc = reference_filter("Hey #{reference}foo")
expect(doc.css('a').first.attr('href')).to eq urls.project_url(subject)
%w(pre code a style).each do |elem|
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