paru 0.3.0a5 → 0.3.0a6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paru/pandoc.rb +7 -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: 488f115207a3ee98fcf8ec1608b1cc9b7fee9325
|
4
|
+
data.tar.gz: 9d8b662d229fe71a3208bbf48ae9242e62024de8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7dd28e653f48a9ec014b28f3c2b197b6da2609ea7862e7d1d5cb5ce07f799154cbe096f392a19e2151c280e03516459ec74ba51cec533a0ceef42c827780d0e
|
7
|
+
data.tar.gz: bc1db4930e33a2e7313330a8f18d0e3c0070143b74aa2bc4d64216e2659d982dddfe97c9d17efa649ea2c1fc4c82dbdfe9900062c9e54ece212b464391f0b29a
|
data/lib/paru/pandoc.rb
CHANGED
@@ -79,6 +79,10 @@ module Paru
|
|
79
79
|
#
|
80
80
|
#
|
81
81
|
class Pandoc
|
82
|
+
|
83
|
+
# Use a readable option separator on Unix-like systems, but fall back
|
84
|
+
# to a space on Windows.
|
85
|
+
DEFAULT_OPTION_SEP = if Gem.win_platform? then " " else " \\\n\t" end
|
82
86
|
|
83
87
|
# Path to the pandoc executatble to use by paru.
|
84
88
|
PARU_PANDOC_PATH = "PARU_PANDOC_PATH"
|
@@ -174,7 +178,7 @@ module Paru
|
|
174
178
|
#
|
175
179
|
# @param option_sep [String] the string to separate options with
|
176
180
|
# @return [String] This converter's command line invocation string.
|
177
|
-
def to_command(option_sep =
|
181
|
+
def to_command(option_sep = DEFAULT_OPTION_SEP)
|
178
182
|
"#{@@pandoc_exec.shellescape}\t#{to_option_string option_sep}"
|
179
183
|
end
|
180
184
|
|
@@ -292,6 +296,8 @@ module Paru
|
|
292
296
|
status = thread.value.exitstatus
|
293
297
|
end
|
294
298
|
|
299
|
+
warn error unless error.empty?
|
300
|
+
|
295
301
|
if 0 < status
|
296
302
|
# pandoc exited with an error
|
297
303
|
raise Paru::Error.new "error while running:\n\n#{command}\n\nPandoc responded with:\n\n#{error}\n"
|