Permalink
Browse files

Merge branch 'master' of github.com:tdreyno/middleman

  • Loading branch information...
tdreyno committed Dec 15, 2011
2 parents c4543ba + bc93d84 commit a63334813f4e80c203a77e36fa82db83e60c14fc
View
@@ -2,6 +2,26 @@ Feature: Markdown support
In order to test included Maruku support
Scenario: Rendering html
- Given the Server is running at "test-app"
- When I go to "/markdown.html"
- Then I should see "<p>Hello World</p>"
+ Given the Server is running at "markdown-app"
+ When I go to "/index.html"
+ Then I should see "<p>Hello World</p>"
+
+ Scenario: Redcarpet 2 extensions
+ Given the Server is running at "markdown-app"
+ When I go to "/smarty_pants.html"
+ Then I should see "&ldquo;"
+ When I go to "/no_intra_emphasis.html"
+ Then I should not see "<em>"
+ When I go to "/tables.html"
+ Then I should see "<table>"
+ When I go to "/fenced_code_blocks.html"
+ Then I should see "<code>"
+ When I go to "/autolink.html"
+ Then I should see "<a href"
+ When I go to "/strikethrough.html"
+ Then I should see "<del>"
+ When I go to "/space_after_headers.html"
+ Then I should not see "<h1>"
+ When I go to "/superscript.html"
+ Then I should see "<sup>"
+
@@ -0,0 +1,9 @@
+set :markdown, :smartypants => true,
+ :no_intra_emphasis => true,
+ :tables => true,
+ :fenced_code_blocks => true,
+ :autolink => true,
+ :strikethrough => true,
+ :lax_html_blocks => true,
+ :space_after_headers => true,
+ :superscript => true
@@ -0,0 +1,5 @@
+---
+layout: false
+---
+
+http://example.com
@@ -0,0 +1,7 @@
+---
+layout: false
+---
+
+~~~~~~~~~~~~~~~~~~~~~
+a one-line code block
+~~~~~~~~~~~~~~~~~~~~~
@@ -0,0 +1,4 @@
+---
+layout: false
+---
+Hello World
@@ -0,0 +1,5 @@
+---
+layout: false
+---
+
+foo_bar_baz
@@ -0,0 +1,5 @@
+---
+layout: false
+---
+
+"Hello"
@@ -0,0 +1,5 @@
+---
+layout: false
+---
+
+#this is my header
@@ -0,0 +1,5 @@
+---
+layout: false
+---
+
+~~Nope~~
@@ -0,0 +1,5 @@
+---
+layout: false
+---
+
+this is the 2^(nd) time
@@ -0,0 +1,8 @@
+---
+layout: false
+---
+
+First Header | Second Header
+------------- | -------------
+Content Cell | Content Cell
+Content Cell | Content Cell
@@ -23,7 +23,6 @@
with_layout false do
page "/request-path.html"
page "/lorem.html"
- page "/markdown.html"
page "/relative_image.html"
page "/inline-css.html"
page "/inline-js.html"
@@ -1 +0,0 @@
-Hello World
View
@@ -41,7 +41,7 @@ def initialize(*)
def init(name)
key = options[:template].to_sym
unless Middleman::Templates.registered.has_key?(key)
- key = :default
+ raise Thor::Error.new "Unknown project template '#{key}'"
end
thor_group = Middleman::Templates.registered[key]
@@ -120,4 +120,4 @@ def help_check
exit 0
end
end
-end
+end
@@ -2,6 +2,12 @@ module Middleman::Renderers::Markdown
class << self
def registered(app)
require "redcarpet"
+
+ # Forcably disable Redcarpet1 support.
+ # Tilt defaults to this if available, but the compat
+ # layer disables extensions.
+ Object.send(:remove_const, :RedcarpetCompat) if defined? ::RedcarpetCompat
+
app.set :markdown_engine, :redcarpet
app.set :markdown_engine_prefix, ::Tilt

0 comments on commit a633348

Please sign in to comment.