makeup
Advanced tools
+2
-2
| PATH | ||
| remote: . | ||
| specs: | ||
| makeup (0.1.1) | ||
| makeup (0.3.0) | ||
| github-markup (~> 0.7) | ||
@@ -16,3 +16,3 @@ htmlentities (~> 4.3) | ||
| posix-spawn (0.3.6) | ||
| pygments.rb (0.3.1) | ||
| pygments.rb (0.3.2) | ||
| posix-spawn (~> 0.3.6) | ||
@@ -19,0 +19,0 @@ yajl-ruby (~> 1.1.0) |
+1
-1
@@ -29,3 +29,3 @@ # encoding: utf-8 | ||
| module Makeup | ||
| VERSION = "0.2.0" | ||
| VERSION = "0.3.0" | ||
| end |
@@ -66,3 +66,3 @@ # encoding: utf-8 | ||
| def closes_code_block?(line) | ||
| active_code_block? && line == "```" | ||
| active_code_block? && line.match(/^```/) | ||
| end | ||
@@ -69,0 +69,0 @@ |
@@ -66,3 +66,31 @@ # encoding: utf-8 | ||
| end | ||
| describe "#render" do | ||
| it "should detect end of code blocks properly" do | ||
| html = @renderer.render("file.md", <<-MD) | ||
| # This stuff | ||
| ```ruby | ||
| class Hello | ||
| def say | ||
| puts "hallo" | ||
| end | ||
| end | ||
| ```hidden-charaters | ||
| # And this stuff | ||
| ```ruby | ||
| class Bonjour | ||
| def say | ||
| puts "bonjour" | ||
| end | ||
| end | ||
| ``` | ||
| MD | ||
| assert_equal 2, html.scan(/rb/).length | ||
| end | ||
| end | ||
| describe "#highlight_code_blocks" do | ||
@@ -69,0 +97,0 @@ it "does not touch non-markdown files" do |