Skip to content

Commit

Permalink
Merge pull request #99 from sensu/badges_not_rendering
Browse files Browse the repository at this point in the history
fix badges not rendering
  • Loading branch information
pzupan authored Feb 11, 2019
2 parents cca88df + b059f60 commit c5f6d2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 188 deletions.
186 changes: 0 additions & 186 deletions active_storage:install

This file was deleted.

7 changes: 5 additions & 2 deletions app/helpers/extension_versions_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,16 @@ def extension_atom_content(extension_version)
# @return [String] the Document content ready to be rendered
#
def render_document(content, extension, repo_loc = "", version = "", hard_wrap: false)
doc = begin
document = begin
if %w(md mdown markdown).include?(extension.downcase)
render_markdown(content, hard_wrap: hard_wrap)
else
content
end
end.gsub(/src="(?!http)(.+)"/, %(src="https://github.com/#{repo_loc}/raw/#{version}/\\1")).html_safe
end
# exlude (?!.*) any domains which we should call directly
document.gsub!(/src="(?!.*travis.ci)(?!http)(.+)"/, %(src="https://github.com/#{repo_loc}/raw/#{version}/\\1"))
document.html_safe
end

def download_url_for(extension_version)
Expand Down

0 comments on commit c5f6d2d

Please sign in to comment.