Skip to content

Commit

Permalink
add helper to get the name of the renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmario committed Feb 11, 2012
1 parent 7506361 commit 886bd90
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/github/markup.rb
Expand Up @@ -69,6 +69,15 @@ def renderer(filename)
nil
end

def renderer_name(filename)
@@markups.each do |key, value|
if Regexp.compile("\\.(#{key})$") =~ filename
return key
end
end
nil
end

def execute(command, target)
out = ''
Open3.popen3(command) do |stdin, stdout, _|
Expand Down

0 comments on commit 886bd90

Please sign in to comment.