haml-kramdown 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source :rubygems
2
+ gemspec
data/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # haml-kramdown
2
+
3
+ This is a HAML filter for using Kramdown to render the inline Markdown texts.
4
+
5
+ ## Usage
6
+
7
+ Actually you simply have to replace your `:markdown` filters with `:kramdown`:
8
+
9
+ Gemfile
10
+
11
+ gem 'haml'
12
+ gem 'kramdown'
13
+ gem 'haml-kramdown'
14
+
15
+ foo.haml
16
+
17
+ .content
18
+ :kramdown
19
+ # Markdown
20
+
21
+ - foo
22
+ - bar
23
+
24
+ That's it!
25
+
26
+ ## Why?
27
+
28
+ There are only two established and pure Ruby Markdown engines: Maruku and
29
+ Kramdown. Although Maruku is widely used and stable it is not actively
30
+ maintained. At that time the current version 0.6.0 was published at May 4, 2009.
31
+
32
+ As some deprecation warnings arised for Maruku I was in need to find an
33
+ alternative and found Kramdown. Unfortunately there was no build-in Kramdown
34
+ support/filter in HAML ...
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path('../lib', __FILE__)
3
+ require 'haml-kramdown/version'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'haml-kramdown'
7
+ s.version = Haml::Kramdown::VERSION
8
+ s.authors = ['blindgaenger']
9
+ s.email = ['blindgaenger@gmail.com']
10
+ s.homepage = ''
11
+ s.summary = %q{HAML filter for Kramdown}
12
+ s.description = %q{HAML filter for Kramdown}
13
+
14
+ s.rubyforge_project = 'haml-kramdown'
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ['lib']
20
+
21
+ s.add_runtime_dependency 'haml'
22
+ end
@@ -0,0 +1,2 @@
1
+ require "haml-kramdown/version"
2
+ require "haml/filters/kramdown"
@@ -0,0 +1,5 @@
1
+ module Haml
2
+ module Kramdown
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,15 @@
1
+ module Haml
2
+ module Filters
3
+
4
+ module Kramdown
5
+ include Base
6
+ lazy_require 'kramdown'
7
+
8
+ # @see Base#render
9
+ def render(text)
10
+ ::Kramdown::Document.new(text).to_html
11
+ end
12
+ end
13
+
14
+ end
15
+ end
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: haml-kramdown
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - blindgaenger
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: haml
16
+ requirement: &70203695536860 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70203695536860
25
+ description: HAML filter for Kramdown
26
+ email:
27
+ - blindgaenger@gmail.com
28
+ executables: []
29
+ extensions: []
30
+ extra_rdoc_files: []
31
+ files:
32
+ - .gitignore
33
+ - Gemfile
34
+ - README.md
35
+ - Rakefile
36
+ - haml-kramdown.gemspec
37
+ - lib/haml-kramdown.rb
38
+ - lib/haml-kramdown/version.rb
39
+ - lib/haml/filters/kramdown.rb
40
+ homepage: ''
41
+ licenses: []
42
+ post_install_message:
43
+ rdoc_options: []
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements: []
59
+ rubyforge_project: haml-kramdown
60
+ rubygems_version: 1.8.11
61
+ signing_key:
62
+ specification_version: 3
63
+ summary: HAML filter for Kramdown
64
+ test_files: []