Skip to content

Commit 80b287f

Browse files
Merge pull request #84 from MongoHQ/gfm
Use GitHub Flavored Markdown for parsing the markdown
2 parents c1a935f + a0ab101 commit 80b287f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source "http://rubygems.org"
55

66
gem 'grape', '>= 0.2.0'
77
gem 'grape-entity', '~> 0.3.0'
8-
gem 'kramdown'
8+
gem 'github-markdown'
99

1010
# Add dependencies to develop your gem here.
1111
# Include everything needed to run rake, tests, features, etc.

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ GEM
1111
diff-lcs (1.1.3)
1212
ffi (1.9.3-java)
1313
git (1.2.5)
14+
github-markdown (0.6.4)
1415
grape (0.5.0)
1516
activesupport
1617
builder
@@ -33,7 +34,6 @@ GEM
3334
rdoc
3435
json (1.7.3)
3536
json (1.7.3-java)
36-
kramdown (0.13.7)
3737
method_source (0.8)
3838
multi_json (1.7.7)
3939
multi_xml (0.5.4)
@@ -83,10 +83,10 @@ PLATFORMS
8383

8484
DEPENDENCIES
8585
bundler (> 1.0.0)
86+
github-markdown
8687
grape (>= 0.2.0)
8788
grape-entity (~> 0.3.0)
8889
jeweler (~> 1.8.4)
89-
kramdown
9090
pry
9191
rack-test
9292
rdoc (~> 3.12)

lib/grape-swagger.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require 'kramdown'
1+
require 'github/markdown'
22

33
module Grape
44
class API
@@ -167,7 +167,7 @@ def self.setup(options)
167167
helpers do
168168

169169
def as_markdown(description)
170-
description && @@markdown ? Kramdown::Document.new(strip_heredoc(description)).to_html : description
170+
description && @@markdown ? GitHub::Markdown.render_gfm(strip_heredoc(description)) : description
171171
end
172172

173173
def parse_params(params, path, method)

0 commit comments

Comments
 (0)