kramdown-plantuml 1.1.10 → 1.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kramdown-plantuml/options.rb +6 -8
- data/lib/kramdown-plantuml/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0307159bac1bde4c2f9d21a19fde7e2c3a474df622f5a0fd54d368d71e7c6884'
|
4
|
+
data.tar.gz: 440a8b11f5398ffc6f73ebf67c9d1eb5e5c91e3fc63fb9a15455033bf413a882
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9a7db962e92eebd1729c3e043d6a6ba0fca49c8365d7eecdacd5120737eda1d0af58c423bdf8cdd7d6101e3421a19c778f9a3fee22148d9948b46f8f0a2d542
|
7
|
+
data.tar.gz: 5fe6ae9a8ffb8941825da89f0bf7f28229631292615938fcd9edd507553148a1feaab272c48fac9509dedffebd70e0cec8a3a6209a5d2ddb74323f575c606b01
|
@@ -10,7 +10,7 @@ module Kramdown
|
|
10
10
|
|
11
11
|
def initialize(options_hash = {})
|
12
12
|
@logger = LogWrapper.init
|
13
|
-
@options = massage(options_hash)
|
13
|
+
@options = massage(options_hash) || {}
|
14
14
|
@raise_errors = extract_raise_errors(@options)
|
15
15
|
extract_theme_options(@options)
|
16
16
|
end
|
@@ -44,9 +44,9 @@ module Kramdown
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def extract_theme_options(options)
|
47
|
-
return if options.empty? || !options.key?(:theme)
|
47
|
+
return if options.nil? || options.empty? || !options.key?(:theme)
|
48
48
|
|
49
|
-
theme = options[:theme]
|
49
|
+
theme = options[:theme]
|
50
50
|
|
51
51
|
unless theme.is_a?(Hash)
|
52
52
|
@logger.warn ":theme is not a Hash: #{theme}"
|
@@ -58,12 +58,10 @@ module Kramdown
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def extract_raise_errors(options)
|
61
|
-
if options.key?(:raise_errors)
|
62
|
-
raise_errors = options[:raise_errors]
|
63
|
-
return boolean(raise_errors, true)
|
64
|
-
end
|
61
|
+
return true if options.nil? || options.empty? || !options.key?(:raise_errors)
|
65
62
|
|
66
|
-
|
63
|
+
raise_errors = options[:raise_errors]
|
64
|
+
boolean(raise_errors, true)
|
67
65
|
end
|
68
66
|
|
69
67
|
def massage(options_hash)
|