Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Commit

Permalink
Fix regression bug where broken link warnings weren't displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
kaankabalak committed Apr 3, 2018
1 parent 07aac91 commit 65dacbb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/gluegun.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def self.gluegun_generate_pages(site_config_file)
end
begin
File.open(File.join(dest_path,"/#{key2["Slug"]}.html"), "w+") do |f|
# Check if link is valid
open(link)
partial_erb_arr.each do |partial_erb|
# Set nil to "-" to activate "<%-" and "-%>" characters
# for non-printing lines in erb file.
Expand Down Expand Up @@ -108,8 +110,10 @@ def self.gluegun_generate_pages(site_config_file)

def self.reveal(link)
begin
response = GitHub::Markdown.render_gfm(open(link).read)
return response
if (!link.nil?)
response = GitHub::Markdown.render_gfm(open(link).read)
return response
end
rescue OpenURI::HTTPError
end
end
Expand Down

0 comments on commit 65dacbb

Please sign in to comment.