paru 0.3.0a5 → 0.3.0a6

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/paru/pandoc.rb +7 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9db11fdd4a88469c49c93ba8832e496ba9d32c32
4
- data.tar.gz: e51316f3376a64fa5b51066ddd5c3755dd258c66
3
+ metadata.gz: 488f115207a3ee98fcf8ec1608b1cc9b7fee9325
4
+ data.tar.gz: 9d8b662d229fe71a3208bbf48ae9242e62024de8
5
5
  SHA512:
6
- metadata.gz: d8b94c28f8ab51e97f66b23458fc17f1d49fba4de5b1793e39a0c19d626eb74768aae62340591566733fcda620967b2313bb408d683b2a757e5ea6a1420265b1
7
- data.tar.gz: 2183943f50a52884963fbd92747dff436d60dba7fb792c39eb3e9bdaa2636e522d22bc886a837bf3c628f0287779a51f191be0c0be5cfbd9fd7f2e761a793da6
6
+ metadata.gz: d7dd28e653f48a9ec014b28f3c2b197b6da2609ea7862e7d1d5cb5ce07f799154cbe096f392a19e2151c280e03516459ec74ba51cec533a0ceef42c827780d0e
7
+ data.tar.gz: bc1db4930e33a2e7313330a8f18d0e3c0070143b74aa2bc4d64216e2659d982dddfe97c9d17efa649ea2c1fc4c82dbdfe9900062c9e54ece212b464391f0b29a
@@ -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 = " \\\n\t")
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0a5
4
+ version: 0.3.0a6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huub de Beer