radiant-kramdown_filter-extension 1.0.12 → 1.0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- data/kramdown_filter_extension.rb +4 -4
- data/lib/kramdown_filter.rb +16 -14
- metadata +10 -9
@@ -1,10 +1,10 @@
|
|
1
|
-
if File.exist? "#{File.dirname(__FILE__)}/vendor/gems/kramdown-0.
|
2
|
-
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/vendor/gems/kramdown-0.
|
1
|
+
if File.exist? "#{File.dirname(__FILE__)}/vendor/gems/kramdown-0.13.2"
|
2
|
+
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/vendor/gems/kramdown-0.13.2/lib"
|
3
3
|
end
|
4
|
-
require
|
4
|
+
require "kramdown"
|
5
5
|
|
6
6
|
class KramdownFilterExtension < Radiant::Extension
|
7
|
-
version "1.0.
|
7
|
+
version "1.0.13.2"
|
8
8
|
description "kramdown is a fast, pure Ruby Markdown converter."
|
9
9
|
url "http://rubygems.org/gems/radiant-kramdown_filter-extension"
|
10
10
|
|
data/lib/kramdown_filter.rb
CHANGED
@@ -8,19 +8,19 @@ class KramdownFilter < TextFilter
|
|
8
8
|
# about the types given as option values but Radiant::Config
|
9
9
|
# stores all values as simple strings.
|
10
10
|
o = {
|
11
|
-
:auto_ids => { :default => true,
|
12
|
-
:auto_id_prefix => { :default => '',
|
13
|
-
:parse_block_html => { :default => false,
|
14
|
-
:parse_span_html => { :default => true,
|
15
|
-
:footnote_nr => { :default => 1,
|
16
|
-
:coderay_wrap => { :default => :div,
|
17
|
-
:coderay_line_numbers => { :default => :inline,
|
18
|
-
:coderay_line_number_start => { :default => 1,
|
19
|
-
:coderay_tab_width => { :default => 0,
|
20
|
-
:coderay_bold_every => { :default => 10,
|
21
|
-
:coderay_css => { :default => :style,
|
22
|
-
:entity_output => { :default => :as_char,
|
23
|
-
:
|
11
|
+
:auto_ids => { :default => true, :type => :boolean },
|
12
|
+
:auto_id_prefix => { :default => '', :type => :string },
|
13
|
+
:parse_block_html => { :default => false, :type => :boolean },
|
14
|
+
:parse_span_html => { :default => true, :type => :boolean },
|
15
|
+
:footnote_nr => { :default => 1, :type => :integer },
|
16
|
+
:coderay_wrap => { :default => :div, :type => :symbol },
|
17
|
+
:coderay_line_numbers => { :default => :inline, :type => :symbol },
|
18
|
+
:coderay_line_number_start => { :default => 1, :type => :integer },
|
19
|
+
:coderay_tab_width => { :default => 0, :type => :integer },
|
20
|
+
:coderay_bold_every => { :default => 10, :type => :integer },
|
21
|
+
:coderay_css => { :default => :style, :type => :symbol },
|
22
|
+
:entity_output => { :default => :as_char, :type => :symbol },
|
23
|
+
:toc_levels => { :default => (1..6).to_a, :type => :object }
|
24
24
|
}
|
25
25
|
# overwrite defaults with user set values
|
26
26
|
o.keys.each { |key|
|
@@ -36,6 +36,8 @@ class KramdownFilter < TextFilter
|
|
36
36
|
when :symbol
|
37
37
|
symbol = c["kramdown.#{key.to_s}"] != "nil" ? c["kramdown.#{key.to_s}"].to_sym : nil
|
38
38
|
o[key][:default] = symbol
|
39
|
+
when :object
|
40
|
+
object = c["kramdown.#{key.to_s}"] != "nil" ? c["kramdown.#{key.to_s}"].to_a : nil
|
39
41
|
end
|
40
42
|
end
|
41
43
|
}
|
@@ -58,7 +60,7 @@ class KramdownFilter < TextFilter
|
|
58
60
|
:coderay_bold_every => o[:coderay_bold_every][:default],
|
59
61
|
:coderay_css => o[:coderay_css][:default],
|
60
62
|
:entity_output => o[:entity_output][:default],
|
61
|
-
:
|
63
|
+
:toc_levels => o[:toc_levels][:default]
|
62
64
|
}).to_html
|
63
65
|
end
|
64
66
|
end
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-kramdown_filter-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 111
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
|
9
|
+
- 13
|
10
|
+
- 2
|
11
|
+
version: 1.0.13.2
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- johnmuhl
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date:
|
19
|
+
date: 2011-02-27 00:00:00 -06:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
@@ -29,9 +30,9 @@ dependencies:
|
|
29
30
|
hash: 47
|
30
31
|
segments:
|
31
32
|
- 0
|
32
|
-
-
|
33
|
-
-
|
34
|
-
version: 0.
|
33
|
+
- 13
|
34
|
+
- 2
|
35
|
+
version: 0.13.2
|
35
36
|
type: :runtime
|
36
37
|
version_requirements: *id001
|
37
38
|
description: |-
|
@@ -82,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
83
|
requirements: []
|
83
84
|
|
84
85
|
rubyforge_project:
|
85
|
-
rubygems_version: 1.3
|
86
|
+
rubygems_version: 1.5.3
|
86
87
|
signing_key:
|
87
88
|
specification_version: 3
|
88
89
|
summary: kramdown extension for Radiant CMS
|