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.
- data/kramdown_filter_extension.rb +1 -1
- data/lib/kramdown_filter.rb +14 -2
- metadata +2 -2
data/lib/kramdown_filter.rb
CHANGED
@@ -1,13 +1,25 @@
|
|
1
|
+
module Kramdown
|
2
|
+
module Converter
|
3
|
+
class Html
|
4
|
+
ESCAPE_MAP = {
|
5
|
+
'<' => '<',
|
6
|
+
'>' => '>',
|
7
|
+
'&' => '&'
|
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(
|
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.
|
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-
|
12
|
+
date: 2010-01-29 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|