reveal-ck 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76630b76941f3736b93bb84794bef7afac6223bd
|
4
|
+
data.tar.gz: 0ad0489bf9dc82923213e3fa9c70edd4f7ef36c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82b2f640d34bf6556c29724d9280f55f3398b3d3c0c03818f963796a658527692fb3f53792c30d59a0bef9946df6763475e50dfce0a2a2ea8f4223824a8a9df1
|
7
|
+
data.tar.gz: bdf45ad90615ccde4081d82bf3489d6ddbf4105008a0b3627bcf831519fae969f24673b4e72ddb3c4ce3cd429bdb3af274617a1e219ddd79c96635b2e353c3c3
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'cgi'
|
1
2
|
require 'redcarpet'
|
2
3
|
|
3
4
|
module RevealCK
|
@@ -13,12 +14,13 @@ module RevealCK
|
|
13
14
|
end
|
14
15
|
|
15
16
|
def block_code(code, language)
|
17
|
+
escaped = CGI.escape_html(code)
|
16
18
|
if language.nil?
|
17
|
-
"<pre><code>#{
|
19
|
+
"<pre><code>#{escaped}</code></pre>"
|
18
20
|
elsif language == 'notes' || language == 'note'
|
19
|
-
"<aside class='notes'>#{
|
21
|
+
"<aside class='notes'>#{escaped}</aside>"
|
20
22
|
else
|
21
|
-
"<pre><code class=\"#{language}\">#{
|
23
|
+
"<pre><code class=\"#{language}\">#{escaped}</code></pre>"
|
22
24
|
end
|
23
25
|
end
|
24
26
|
end
|
data/lib/reveal-ck/version.rb
CHANGED
@@ -49,6 +49,17 @@ eos
|
|
49
49
|
expect(output).to include 'a + b'
|
50
50
|
end
|
51
51
|
|
52
|
+
it 'converts special characters in ``` block to entity references' do
|
53
|
+
output = render_markdown <<-eos
|
54
|
+
```
|
55
|
+
<p>"&"</p>
|
56
|
+
```
|
57
|
+
eos
|
58
|
+
expect(output).to include '<pre><code>'
|
59
|
+
expect(output).to include '</code></pre>'
|
60
|
+
expect(output).to include '<p>"&"</p>'
|
61
|
+
end
|
62
|
+
|
52
63
|
it 'wraps ```ruby code in a <pre> and <code class="ruby">' do
|
53
64
|
output = render_markdown <<-eos
|
54
65
|
```ruby
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reveal-ck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jed Northridge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: RedCloth
|