tilt-rdoc-markdown 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tilt/rdoc/markdown.rb +25 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fabc1063f3b8eb3f538a2f86dca13a4d49ae1eb
|
4
|
+
data.tar.gz: 0f322ae095c5d7ca9e71774ca1ece9229aaaad79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d3622b169fb9bb2b4e0c4f82ae2933a66e6872fd1db7954152a616d551bdd968a4211530b7cdb4463bc274b5e1c094e12a21528fe08cebd10817673c5184d16
|
7
|
+
data.tar.gz: 5141d59de225fdb0ff409ac8ce99a6361bfbd3e3b9947d57113488a95f51235c73511d3883273df6f69b4f91262d1105517342fa8721745fc8ceb4df7f9b8117
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require "rdoc"
|
2
|
+
require "tilt"
|
3
|
+
require "tilt/template"
|
4
|
+
|
5
|
+
module Tilt
|
6
|
+
module RDoc
|
7
|
+
class Markdown < ::Tilt::Template
|
8
|
+
VERSION = "0.0.2"
|
9
|
+
|
10
|
+
def prepare # :nodoc:
|
11
|
+
@engine = ::RDoc::Markdown.new
|
12
|
+
@output = nil
|
13
|
+
end
|
14
|
+
|
15
|
+
def evaluate(scope, locals, &block) # :nodoc:
|
16
|
+
opts = ::RDoc::Options.new
|
17
|
+
opts.pipe = true # TODO: find a good way to expose this to tilt users
|
18
|
+
formatter = ::RDoc::Markup::ToHtml.new(opts, nil)
|
19
|
+
@output ||= @engine.parse(data).accept(formatter)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
register RDoc::Markdown, 'markdown', 'mkd', 'md'
|
25
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tilt-rdoc-markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zachary Scott
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- LICENSE.txt
|
93
93
|
- README.md
|
94
94
|
- Rakefile
|
95
|
+
- lib/tilt/rdoc/markdown.rb
|
95
96
|
- spec/spec_helper.rb
|
96
97
|
- spec/tilt_rdoc_markdown_spec.rb
|
97
98
|
- tilt-rdoc-markdown.gemspec
|