Skip to content

Commit

Permalink
Merge pull request #1157 from github/kivikakk/remove-file-read
Browse files Browse the repository at this point in the history
Remove filesystem access
  • Loading branch information
Ashe Connor authored Jan 30, 2018
2 parents b8b14ec + 165860d commit 6d3631e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/github/markup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ def preload!
end
end

def render(filename, content = nil, symlink = nil)
content ||= File.read(filename)
symlink = (File.symlink?(filename) rescue false) if symlink.nil?

def render(filename, content, symlink = false)
if impl = renderer(filename, content, symlink)
impl.render(filename, content)
else
Expand Down

0 comments on commit 6d3631e

Please sign in to comment.