kramdown-haml 0.0.2

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,36 @@
1
+ # kramdown-haml
2
+
3
+ This is a HAML filter for using Kramdown to render the inline Markdown texts.
4
+
5
+ This is a fork of the [haml-kramdown gem](https://github.com/blindgaenger/kramdown-haml) but it does **not** use the `:kramdown` filter.
6
+
7
+ ## Usage
8
+
9
+ Simply use the standard `:markdown` filter:
10
+
11
+ Gemfile
12
+
13
+ gem 'haml'
14
+ gem 'kramdown'
15
+ gem 'kramdown-haml'
16
+
17
+ foo.haml
18
+
19
+ .content
20
+ :markdown
21
+ # Kramdown
22
+
23
+ - foo
24
+ - bar
25
+
26
+ That's it!
27
+
28
+ ## Why?
29
+
30
+ There are only two established and pure Ruby Markdown engines: Maruku and
31
+ Kramdown. Although Maruku is widely used and stable it is not actively
32
+ maintained. At that time the current version 0.6.0 was published at May 4, 2009.
33
+
34
+ As some deprecation warnings arised for Maruku I was in need to find an
35
+ alternative and found Kramdown. Unfortunately there was no build-in Kramdown
36
+ 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 'kramdown-haml/version'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'kramdown-haml'
7
+ s.version = Haml::Kramdown::VERSION
8
+ s.authors = ['']
9
+ s.email = ['']
10
+ s.homepage = ''
11
+ s.summary = %q{HAML filter for Kramdown}
12
+ s.description = %q{HAML filter for Kramdown}
13
+
14
+ s.rubyforge_project = 'kramdown-haml'
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,14 @@
1
+ module Haml
2
+ module Filters
3
+ module Markdown
4
+ include Haml::Filters::Base
5
+ lazy_require 'kramdown'
6
+
7
+ def render(text)
8
+ ::Kramdown::Document.new(text).to_html
9
+ end
10
+ end
11
+ end
12
+ end
13
+
14
+
@@ -0,0 +1,2 @@
1
+ require "kramdown-haml/version"
2
+ require "haml/filters/markdown"
@@ -0,0 +1,5 @@
1
+ module Haml
2
+ module Kramdown
3
+ VERSION = "0.0.2"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: kramdown-haml
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - ''
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: haml
16
+ requirement: !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: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: HAML filter for Kramdown
31
+ email:
32
+ - ''
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - .gitignore
38
+ - Gemfile
39
+ - README.md
40
+ - Rakefile
41
+ - kramdown-haml.gemspec
42
+ - lib/haml/filters/markdown.rb
43
+ - lib/kramdown-haml.rb
44
+ - lib/kramdown-haml/version.rb
45
+ homepage: ''
46
+ licenses: []
47
+ post_install_message:
48
+ rdoc_options: []
49
+ require_paths:
50
+ - lib
51
+ required_ruby_version: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ requirements: []
64
+ rubyforge_project: kramdown-haml
65
+ rubygems_version: 1.8.24
66
+ signing_key:
67
+ specification_version: 3
68
+ summary: HAML filter for Kramdown
69
+ test_files: []
70
+ has_rdoc: