all repos — markup @ 886bd90b2efccc83b12656d054a170c17c33ed64

The code we use to render README.your_favorite_markup

add helper to get the name of the renderer
Brian Lopez seniorlopez@gmail.com
Fri, 10 Feb 2012 18:06:37 -0800
commit

886bd90b2efccc83b12656d054a170c17c33ed64

parent

7506361b4f21e7de7b839503608e69da55529f7c

1 files changed, 9 insertions(+), 0 deletions(-)

jump to
M lib/github/markup.rblib/github/markup.rb

@@ -69,6 +69,15 @@ end

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, _|