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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.3.1
4
+
5
+ * Guard against nil node replacement in SyntaxHighlightFilter #84 jbarnette
6
+
3
7
  ## 0.3.0
4
8
 
5
9
  * Add support for manually specified default language in SyntaxHighlightFilter #81 jbarnette
@@ -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
- klass = node["class"]
24
- klass = [klass, "highlight-#{lang}"].compact.join " "
22
+ if (node = node.replace(html).first)
23
+ klass = node["class"]
24
+ klass = [klass, "highlight-#{lang}"].compact.join " "
25
25
 
26
- node["class"] = klass
26
+ node["class"] = klass
27
+ end
27
28
  end
28
29
  doc
29
30
  end
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Pipeline
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
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-08-31 00:00:00 -07:00
19
+ date: 2013-09-16 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency