radiant-kramdown_filter-extension 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ end
4
4
  require 'kramdown'
5
5
 
6
6
  class KramdownFilterExtension < Radiant::Extension
7
- version "1.0.3"
7
+ version "1.0.4"
8
8
  description "kramdown is a fast pure-Ruby Markdown converter."
9
9
  url "http://github.com/johnmuhl/radiant-kramdown_filter-extension"
10
10
 
@@ -1,13 +1,25 @@
1
+ module Kramdown
2
+ module Converter
3
+ class Html
4
+ ESCAPE_MAP = {
5
+ '<' => '&lt;',
6
+ '>' => '&gt;',
7
+ '&' => '&amp;'
8
+ }
9
+ end
10
+ end
11
+ end
12
+
1
13
  class KramdownFilter < TextFilter
2
14
  unloadable
3
15
  description_file File.dirname(__FILE__) + "/../markdown.html"
4
16
  def filter(text)
5
17
  auto_ids = true if Radiant::Config['kramdown_auto_ids'] == 'true'
6
18
  parse_block_html = true if Radiant::Config['kramdown_parse_block_html'] == 'true'
7
- Kramdown::Document.new(RubyPants.new(text).to_html, {
19
+ RubyPants.new(Kramdown::Document.new(text, {
8
20
  :auto_ids => auto_ids || false,
9
21
  :parse_block_html => parse_block_html || false,
10
22
  :coderay => nil
11
- }).to_html
23
+ }).to_html).to_html
12
24
  end
13
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-kramdown_filter-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - johnmuhl
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-27 00:00:00 -06:00
12
+ date: 2010-01-29 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency