pandoc-ruby 2.1.2 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1463781defea383e2173516fdbcd675b94e344744f46eecdd902a075e0ec9be8
4
- data.tar.gz: 93e469307308ea223721b89c0084cbe5f05682417535956d3256653fa9824d7d
3
+ metadata.gz: 650e0986f59f42561631dfdce08087dceb3de5e5b29e1f14172238aa035ea364
4
+ data.tar.gz: e8b2c8d850877561d3c7336fdc9aa1ae2f3282be0f3e8f7de12211f7d64c0bc1
5
5
  SHA512:
6
- metadata.gz: 5846c2d7a9dc807268512de610885fc6b10d1191273e85f229fced89bcec25e8b54faa05e8e5cc0660ee502cb5636dff0ac7eb4daa4b858ac676d97333f71476
7
- data.tar.gz: 3121cc63b9f2739cae06d85ed008b138c113332f72ca45bc6268ae782e86ae139f5fdc2192d065bce8c99d8bd73ff93dc87064c517b81d0b6c6d8393f5c7b66d
6
+ metadata.gz: 8bf133e569fcdcd1bff4367d532cf076677e6535e803fe737034871897a6b4ec25994a3a9c56f3913510d32c7d7560142881ab852b6d989bd7f491a4d0fac579
7
+ data.tar.gz: fa7eb59f4b16126a3b838dfd91932080a0ff2eb7a9613f7c7a6041c1dfa74831fc56d3af87d60fbc4916449aa620d3e99cdf613cf119b32421e154d63d134d9f
data/README.md CHANGED
@@ -48,13 +48,13 @@ symbols or strings for options without arguments and hashes of strings or
48
48
  symbols for options with arguments.
49
49
 
50
50
  ```ruby
51
- PandocRuby.convert('# Markdown Title', :s, {f: :markdown, to: :rst}, 'no-wrap', :table_of_contents)
51
+ PandocRuby.convert('# Markdown Title', :s, {f: :markdown, to: :rst}, '--wrap=none', :table_of_contents)
52
52
  ```
53
53
 
54
54
  is equivalent to
55
55
 
56
56
  ```bash
57
- echo "# Markdown Title" | pandoc -s -f markdown --to=rst --no-wrap --table-of-contents
57
+ echo "# Markdown Title" | pandoc -s -f markdown --to=rst --wrap=none --table-of-contents
58
58
  ```
59
59
 
60
60
  Also provided are `#to_[writer]` instance methods for each of the writers,
@@ -317,6 +317,8 @@ class PandocRuby
317
317
  def format_flag(flag)
318
318
  if flag.length == 1
319
319
  " -#{flag}"
320
+ elsif flag =~ /^-|\+/
321
+ " #{flag}"
320
322
  else
321
323
  " --#{flag.to_s.tr('_', '-')}"
322
324
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = 'pandoc-ruby'
8
- s.version = '2.1.2'
8
+ s.version = '2.1.3'
9
9
  s.authors = ['William Melody']
10
10
  s.date = '2020-03-23'
11
11
  s.description = 'Ruby wrapper for Pandoc'
@@ -92,6 +92,17 @@ describe PandocRuby do
92
92
  assert converter.convert
93
93
  end
94
94
 
95
+ it 'passes command line options without modification' do
96
+ converter = PandocRuby.new(
97
+ @string,
98
+ '+RTS', '-M512M', '-RTS', '--to=markdown', '--no-wrap'
99
+ )
100
+ converter.expects(:execute).with(
101
+ 'pandoc +RTS -M512M -RTS --to=markdown --no-wrap'
102
+ ).returns(true)
103
+ assert converter.convert
104
+ end
105
+
95
106
  it 'supports reader extensions' do
96
107
  assert_equal(
97
108
  PandocRuby.convert(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandoc-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Melody