Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add helper to get the name of the renderer

  • Loading branch information...
commit 886bd90b2efccc83b12656d054a170c17c33ed64 1 parent 7506361
@brianmario brianmario authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/github/markup.rb
View
9 lib/github/markup.rb
@@ -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, _|
Please sign in to comment.
Something went wrong with that request. Please try again.