pandoc-ruby 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pandoc-ruby.rb +5 -5
- data/pandoc-ruby.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e19f0c6cc6cd66943e74800edbc5bb43c551db7a
|
4
|
+
data.tar.gz: 9fef27d8c653f5386ec638b785396c97a0362c2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69b11985fe7068135927b4a2a1219b577cf1fae4bdbcc26094f6a3dc265e9c3aea4af84c84fbd6ef7cece2c39ca878a1e33543f0bf35a97c4df42bd3ab0d83c6
|
7
|
+
data.tar.gz: f7569bb7b4ae538fe4b2b606a9ad9ef4086e55d51d919d46c18259e6aed83a071f32eab03e13995a7337da494882355cbf7e4541bc6c89d97ec80fe49a482b52
|
data/lib/pandoc-ruby.rb
CHANGED
@@ -183,8 +183,8 @@ private
|
|
183
183
|
# and written to, then read back into the program as a string, then the
|
184
184
|
# temp file is closed and unlinked.
|
185
185
|
def convert_binary
|
186
|
+
tmp_file = Tempfile.new('pandoc-conversion')
|
186
187
|
begin
|
187
|
-
tmp_file = Tempfile.new('pandoc-conversion')
|
188
188
|
self.options += [{:output => tmp_file.path}]
|
189
189
|
self.option_string = "#{self.option_string} --output #{tmp_file.path}"
|
190
190
|
execute(command_with_options)
|
@@ -221,7 +221,7 @@ private
|
|
221
221
|
def prepare_options(opts = [])
|
222
222
|
opts.inject('') do |string, (option, value)|
|
223
223
|
string += case
|
224
|
-
when value
|
224
|
+
when value
|
225
225
|
create_option(option, value)
|
226
226
|
when option.respond_to?(:each_pair)
|
227
227
|
prepare_options(option)
|
@@ -238,15 +238,15 @@ private
|
|
238
238
|
return if !flag
|
239
239
|
set_pandoc_ruby_options(flag, argument)
|
240
240
|
if !!argument
|
241
|
-
"#{
|
241
|
+
"#{format_flag(flag)} #{argument}"
|
242
242
|
else
|
243
|
-
|
243
|
+
format_flag(flag)
|
244
244
|
end
|
245
245
|
end
|
246
246
|
|
247
247
|
# Formats an option flag in order to be used with the pandoc command line
|
248
248
|
# tool.
|
249
|
-
def
|
249
|
+
def format_flag(flag)
|
250
250
|
if flag.length == 1
|
251
251
|
" -#{flag}"
|
252
252
|
else
|
data/pandoc-ruby.gemspec
CHANGED