forem-redcarpet 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c1cf8a9bc906e145e94bb6201a7174f1f5181171
4
+ data.tar.gz: 5496431d0845ea059b22a5ceaf30bb24f6aa0573
5
+ SHA512:
6
+ metadata.gz: 4068c104bca35df28f877b177f7aadece2fa5a7c7a6c5085d89b79c1bfcda5da5c5577201935811fa9488d82ca1e8fcdfe26c13a8be48b4121e74c73abfb4eb9
7
+ data.tar.gz: c06d20d03160057bf2a2017907ab75d51fee72caf1ae4104258f11f3f9fdf0950a401eae40af4fe086994e8ec4b14d64cb8bcf5c55467b723bb6ae67984d85d4
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "forem-redcarpet"
6
- s.version = "1.0.1"
6
+ s.version = "1.0.2"
7
7
  s.authors = ["Ryan Bigg"]
8
8
  s.email = ["radarlistener@gmail.com"]
9
9
  s.homepage = ""
@@ -14,6 +14,6 @@ Gem::Specification.new do |s|
14
14
  s.require_paths = ["lib"]
15
15
 
16
16
  s.add_dependency 'nokogiri'
17
- s.add_dependency 'redcarpet', '2.3.0'
18
- s.add_dependency 'pygments.rb', '0.5.0'
17
+ s.add_dependency 'redcarpet', '3.0.0'
18
+ s.add_dependency 'pygments.rb', '0.5.4'
19
19
  end
@@ -8,7 +8,7 @@ module Forem
8
8
  def self.format(text)
9
9
  options = [:hard_wrap, :filter_html, :autolink, :no_intraemphasis, :fenced_code, :gh_blockcode]
10
10
  renderer = ::Redcarpet::Markdown.new(::Redcarpet::Render::HTML, :fenced_code_blocks => true)
11
- syntax_highlight(renderer.render(text)).html_safe
11
+ syntax_highlight(Forem::Sanitizer.sanitize(renderer.render(text))).html_safe
12
12
  end
13
13
 
14
14
  def self.blockquote(text)
@@ -24,6 +24,11 @@ module Forem
24
24
  end
25
25
  doc.to_s
26
26
  end
27
+
28
+ # This postpones the sanitization until *after* the rendered has rendered all the text.
29
+ def self.sanitize(text)
30
+ text
31
+ end
27
32
  end
28
33
  end
29
34
  end
metadata CHANGED
@@ -1,64 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forem-redcarpet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
5
- prerelease:
4
+ version: 1.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ryan Bigg
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-05-27 00:00:00.000000000 Z
11
+ date: 2013-11-26 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: nokogiri
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: redcarpet
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - '='
36
32
  - !ruby/object:Gem::Version
37
- version: 2.3.0
33
+ version: 3.0.0
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - '='
44
39
  - !ruby/object:Gem::Version
45
- version: 2.3.0
40
+ version: 3.0.0
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: pygments.rb
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - '='
52
46
  - !ruby/object:Gem::Version
53
- version: 0.5.0
47
+ version: 0.5.4
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - '='
60
53
  - !ruby/object:Gem::Version
61
- version: 0.5.0
54
+ version: 0.5.4
62
55
  description: Provides Recarpet markup (with syntax highlighting by pygments.rb) for
63
56
  Forem posts
64
57
  email:
@@ -76,28 +69,26 @@ files:
76
69
  - lib/forem/formatters/redcarpet.rb
77
70
  homepage: ''
78
71
  licenses: []
72
+ metadata: {}
79
73
  post_install_message:
80
74
  rdoc_options: []
81
75
  require_paths:
82
76
  - lib
83
77
  required_ruby_version: !ruby/object:Gem::Requirement
84
- none: false
85
78
  requirements:
86
- - - ! '>='
79
+ - - '>='
87
80
  - !ruby/object:Gem::Version
88
81
  version: '0'
89
82
  required_rubygems_version: !ruby/object:Gem::Requirement
90
- none: false
91
83
  requirements:
92
- - - ! '>='
84
+ - - '>='
93
85
  - !ruby/object:Gem::Version
94
86
  version: '0'
95
87
  requirements: []
96
88
  rubyforge_project:
97
- rubygems_version: 1.8.25
89
+ rubygems_version: 2.1.0
98
90
  signing_key:
99
- specification_version: 3
91
+ specification_version: 4
100
92
  summary: Provides Redcarpet markup (with syntax highlighting by pygments.rb) for Forem
101
93
  posts
102
94
  test_files: []
103
- has_rdoc: