[28578] Fix work package parsing regression.

https://community.openproject.com/wp/28578
pull/6714/head
Oliver Günther 6 years ago
parent 99452726f3
commit b90d02af70
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 1
      lib/open_project/text_formatting/matchers/resource_links_matcher.rb
  2. 6
      spec/lib/open_project/text_formatting/markdown/markdown_spec.rb

@ -98,6 +98,7 @@ module OpenProject::TextFormatting
)
|\.\z # Allow matching when string ends with .
|, # or with ,
|\) # or with )
|[[:space:]]
|\]
|<

@ -231,6 +231,12 @@ describe OpenProject::TextFormatting,
it { is_expected.to be_html_eql("<p>#{issue_link}, [#{issue_link}], (#{issue_link}) and #{issue_link}.</p>") }
end
context 'Plain issue link with braces' do
subject { format_text("foo (bar ##{issue.id})") }
it { is_expected.to be_html_eql("<p>foo (bar #{issue_link})</p>") }
end
context 'Plain issue link to non-existing element' do
subject { format_text('#0123456789') }

Loading…
Cancel
Save