diff options
author | Sacred Seven <sacred.seven@yahoo.com> | 2014-12-29 15:48:58 +0300 |
---|---|---|
committer | Sacred Seven <sacred.seven@yahoo.com> | 2014-12-29 15:48:58 +0300 |
commit | 3913f247b1cc34d7b013b8be7d784f6ff193f6cf (patch) | |
tree | 325fa5a131d770487904030697027c4edf78124a /app | |
parent | a133cf3bb0f7dee7d958793e9b047ef27d2a3126 (diff) |
Better fix for #4
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/gitlab_markdown_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb index 37095652513..45cd199edfc 100644 --- a/app/helpers/gitlab_markdown_helper.rb +++ b/app/helpers/gitlab_markdown_helper.rb @@ -50,7 +50,7 @@ module GitlabMarkdownHelper end html_doc = Nokogiri::HTML(@markdown.render(text)) html_doc.css(':not(li)').each { |dom| dom[:dir] = :auto } - html_doc.to_html.gsub(%r{\{anchor=([\w-]+)\}}m) { |match| "<a name=\'#{$1}\'></a>" }.html_safe + html_doc.to_html.html_safe end # Return the first line of +text+, up to +max_chars+, after parsing the line |