diff --git a/lib/github/markup/markdown.rb b/lib/github/markup/markdown.rb index f4ef99dc..521160cb 100644 --- a/lib/github/markup/markdown.rb +++ b/lib/github/markup/markdown.rb @@ -25,7 +25,7 @@ class Markdown < Implementation } def initialize - super(/md|mkdn?|mdwn|mdown|markdown|litcoffee/) + super(/md|mkdn?|mdwn|mdown|markdown|litcoffee|apib/) end def load diff --git a/test/markup_test.rb b/test/markup_test.rb index 6f062c39..e2315d16 100644 --- a/test/markup_test.rb +++ b/test/markup_test.rb @@ -37,6 +37,7 @@ def test_knows_what_it_can_and_cannot_render assert_equal true, GitHub::Markup.can_render?('README.markdown') assert_equal false, GitHub::Markup.can_render?('README.cmd') assert_equal true, GitHub::Markup.can_render?('README.litcoffee') + assert_equal true, GitHub::Markup.can_render?('README.apib') end def test_fails_gracefully_on_missing_commands diff --git a/test/markups/README.apib b/test/markups/README.apib new file mode 100644 index 00000000..1698545a --- /dev/null +++ b/test/markups/README.apib @@ -0,0 +1,12 @@ +# Example API +This is an example Web API described in the [API Blueprint format](https://github.com/apiaryio/api-blueprint). + +## Message Resource [/message] +An example resource. + +### Retrieve Message [GET] +Retrieve the message. + ++ Response 200 (text/plain) + + Hello World! diff --git a/test/markups/README.apib.html b/test/markups/README.apib.html new file mode 100644 index 00000000..2d2b5cf9 --- /dev/null +++ b/test/markups/README.apib.html @@ -0,0 +1,18 @@ +
This is an example Web API described in the API Blueprint format.
+ +An example resource.
+ +Retrieve the message.
+ +Response 200 (text/plain)
+ +Hello World!
+