makeup
Advanced tools
+3
-3
| PATH | ||
| remote: . | ||
| specs: | ||
| makeup (0.1.0) | ||
| makeup (0.1.1) | ||
| github-markup (~> 0.7) | ||
@@ -20,3 +20,3 @@ htmlentities (~> 4.3) | ||
| rake (0.9.2.2) | ||
| redcarpet (2.1.1) | ||
| redcarpet (2.2.0) | ||
| yajl-ruby (1.1.0) | ||
@@ -31,2 +31,2 @@ | ||
| rake (~> 0.9) | ||
| redcarpet | ||
| redcarpet (= 2.2.0) |
+1
-1
@@ -29,3 +29,3 @@ # encoding: utf-8 | ||
| module Makeup | ||
| VERSION = "0.1.1" | ||
| VERSION = "0.2.0" | ||
| end |
+18
-0
@@ -30,2 +30,16 @@ # encoding: utf-8 | ||
| module Makeup | ||
| # Ugly work-around to access GitHub::Markup's @@markups without | ||
| # monkey-patching the module. | ||
| module GitHubMarkupAccessor | ||
| include GitHub::Markup | ||
| def self.markups | ||
| @@supported ||= (@@markups.keys.map do |key| | ||
| key.to_s.match(/\(\?-mix:(.*)\)/)[1].split("|").map do |s| | ||
| { :suffix => "*.#{s}" } | ||
| end | ||
| end).flatten | ||
| end | ||
| end | ||
| class NoopHighlighter | ||
@@ -60,3 +74,7 @@ def highlight(path, code, options = {}) | ||
| end | ||
| def self.markups | ||
| GitHubMarkupAccessor.markups | ||
| end | ||
| end | ||
| end |
+1
-1
@@ -26,3 +26,3 @@ # -*- encoding: utf-8 -*- | ||
| s.add_development_dependency "rake", "~> 0.9" | ||
| s.add_development_dependency "redcarpet" | ||
| s.add_development_dependency "redcarpet", "2.2.0" | ||
@@ -29,0 +29,0 @@ s.files = `git ls-files`.split("\n") |
@@ -92,2 +92,11 @@ # encoding: utf-8 | ||
| end | ||
| describe "markups" do | ||
| it "provides a list of supported markups" do | ||
| markups = Makeup::Markup.markups | ||
| assert Array === markups | ||
| assert(markups.find { |m| m[:suffix] == "*.md" }) | ||
| end | ||
| end | ||
| end |