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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tilt/rdoc/markdown.rb +25 -0
  3. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b08e3d537b7f35a4baf93fda1b77237f27a70d8e
4
- data.tar.gz: 0916d93c4edc285b010d20d16c5f1c66640af3f0
3
+ metadata.gz: 3fabc1063f3b8eb3f538a2f86dca13a4d49ae1eb
4
+ data.tar.gz: 0f322ae095c5d7ca9e71774ca1ece9229aaaad79
5
5
  SHA512:
6
- metadata.gz: e2ea72e5924ee4bc6526b12d1b2261368599be69f1c1abb03cf97cf46154508b22217987fd65c23a964bfa1d35edd64a87db5014d68561a2af0c4700fc2c1b23
7
- data.tar.gz: 16c937196f97f8f393a7fc28b3b23c7ceff6a9187e74500f58a111b560ac0e536738a66aaed97789d1e96387e0a7b2f546f34a9e7802e7757c58749c3d4bdc1a
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.1
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