html-pipeline 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/html/pipeline/syntax_highlight_filter.rb +5 -4
- data/lib/html/pipeline/version.rb +1 -1
- metadata +4 -4
data/CHANGELOG.md
CHANGED
@@ -19,11 +19,12 @@ module HTML
|
|
19
19
|
html = highlight_with_timeout_handling(lexer, text)
|
20
20
|
next if html.nil?
|
21
21
|
|
22
|
-
node = node.replace(html).first
|
23
|
-
|
24
|
-
|
22
|
+
if (node = node.replace(html).first)
|
23
|
+
klass = node["class"]
|
24
|
+
klass = [klass, "highlight-#{lang}"].compact.join " "
|
25
25
|
|
26
|
-
|
26
|
+
node["class"] = klass
|
27
|
+
end
|
27
28
|
end
|
28
29
|
doc
|
29
30
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html-pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Tomayko
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2013-
|
19
|
+
date: 2013-09-16 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|