radiant-kramdown_filter-extension 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
1
- if File.exist? "#{File.dirname(__FILE__)}/vendor/gems/kramdown-0.6.0"
2
- $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/vendor/gems/kramdown-0.6.0/lib"
1
+ if File.exist? "#{File.dirname(__FILE__)}/vendor/gems/kramdown-0.8.0"
2
+ $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/vendor/gems/kramdown-0.8.0/lib"
3
3
  end
4
4
  require 'kramdown'
5
5
 
6
6
  class KramdownFilterExtension < Radiant::Extension
7
- version "1.0.5"
8
- description "kramdown is a fast pure-Ruby Markdown converter."
9
- url "http://github.com/johnmuhl/radiant-kramdown_filter-extension"
7
+ version "1.0.8"
8
+ description "kramdown is a fast, pure Ruby Markdown converter."
9
+ url "http://rubygems.org/gems/radiant-kramdown_filter-extension"
10
10
 
11
11
  def activate
12
12
  KramdownFilter
@@ -1,12 +1,23 @@
1
1
  class KramdownFilter < TextFilter
2
2
  description_file File.dirname(__FILE__) + "/../markdown.html"
3
3
  def filter(text)
4
- auto_ids = true if Radiant::Config['kramdown_auto_ids'] == 'true'
5
- parse_block_html = true if Radiant::Config['kramdown_parse_block_html'] == 'true'
6
- RubyPants.new(Kramdown::Document.new(text, {
7
- :auto_ids => auto_ids || false,
8
- :parse_block_html => parse_block_html || false,
9
- :coderay => nil
10
- }).to_html).to_html
4
+ auto_ids = true if Radiant::Config['kramdown.auto_ids'] == 'true'
5
+ parse_block_html = true if Radiant::Config['kramdown.parse_block_html'] == 'true'
6
+ coderay_wrap = Radiant::Config['kramdown.coderay_wrap'].to_sym if Radiant::Config['kramdown.coderay_wrap']
7
+ coderay_line_numbers = Radiant::Config['kramdown.coderay_line_numbers'].to_sym if Radiant::Config['kramdown.coderay_line_numbers'] != nil
8
+ coderay_line_number_start = Radiant::Config['kramdown.coderay_line_number_start'].to_i if Radiant::Config['kramdown.coderay_line_number_start']
9
+ coderay_tab_width = Radiant::Config['kramdown.coderay_tab_width'].to_i if Radiant::Config['kramdown.coderay_tab_width']
10
+ coderay_bold_every = Radiant::Config['kramdown.coderay_bold_every'].to_i if Radiant::Config['kramdown.coderay_bold_every']
11
+ coderay_css = Radiant::Config['kramdown.coderay_css'].to_sym if Radiant::Config['kramdown.coderay_css']
12
+ Kramdown::Document.new(text, {
13
+ :auto_ids => auto_ids || false,
14
+ :parse_block_html => parse_block_html || false,
15
+ :coderay_wrap => coderay_wrap || nil,
16
+ :coderay_line_numbers => coderay_line_numbers || nil,
17
+ :coderay_line_number_start => coderay_line_number_start || 1,
18
+ :coderay_tab_width => coderay_tab_width || 2,
19
+ :coderay_bold_every => coderay_bold_every || 10,
20
+ :coderay_css => coderay_css || :style
21
+ }).to_html
11
22
  end
12
23
  end
File without changes
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-kramdown_filter-extension
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 7
4
5
  prerelease: false
5
6
  segments:
6
7
  - 1
7
8
  - 0
8
- - 7
9
- version: 1.0.7
9
+ - 8
10
+ version: 1.0.8
10
11
  platform: ruby
11
12
  authors:
12
13
  - johnmuhl
@@ -14,24 +15,28 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-04-19 00:00:00 -05:00
18
+ date: 2010-06-12 00:00:00 -05:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: kramdown
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
- - - ">="
27
+ - - "="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 63
27
30
  segments:
28
31
  - 0
29
- - 6
32
+ - 8
30
33
  - 0
31
- version: 0.6.0
34
+ version: 0.8.0
32
35
  type: :runtime
33
36
  version_requirements: *id001
34
- description: Radiant CMS extension that wraps the pure-Ruby kramdown Markdown converter.
37
+ description: |-
38
+ A kramdown filter extension for Radiant CMS.
39
+ Visit http://kramdown.rubyforge.org/ for more information about kramdown.
35
40
  email: git@johnmuhl.com
36
41
  executables: []
37
42
 
@@ -42,6 +47,7 @@ extra_rdoc_files: []
42
47
  files:
43
48
  - kramdown_filter_extension.rb
44
49
  - lib/kramdown_filter.rb
50
+ - lib/radiant-kramdown_filter-extension.rb
45
51
  - lib/tasks/kramdown_filter_extension_tasks.rake
46
52
  - markdown.html
47
53
  - Rakefile
@@ -56,25 +62,29 @@ rdoc_options: []
56
62
  require_paths:
57
63
  - lib
58
64
  required_ruby_version: !ruby/object:Gem::Requirement
65
+ none: false
59
66
  requirements:
60
67
  - - ">="
61
68
  - !ruby/object:Gem::Version
69
+ hash: 3
62
70
  segments:
63
71
  - 0
64
72
  version: "0"
65
73
  required_rubygems_version: !ruby/object:Gem::Requirement
74
+ none: false
66
75
  requirements:
67
76
  - - ">="
68
77
  - !ruby/object:Gem::Version
78
+ hash: 3
69
79
  segments:
70
80
  - 0
71
81
  version: "0"
72
82
  requirements: []
73
83
 
74
84
  rubyforge_project:
75
- rubygems_version: 1.3.6
85
+ rubygems_version: 1.3.7
76
86
  signing_key:
77
87
  specification_version: 3
78
- summary: kramdown filter for Radiant CMS
88
+ summary: kramdown extension for Radiant CMS
79
89
  test_files: []
80
90