paru 0.4.2.5 → 0.4.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: ff5d895bd1675d8630dac44d11b034a596d07b05c78950799a06a88433ae4755
4
- data.tar.gz: e16144eff9fb437f2544a10ce6e82064ce7fb90b91c6b81cf56f359a8d8f6bcf
3
+ metadata.gz: b56730c82e1a52321e635423e8bf5dcd5679cc4902a44c6bdcb9ea5f7eb02644
4
+ data.tar.gz: 3368084001dd7f8a3d16b93c6b57a2a671762b8c853f90116a4ff8575b3562c5
5
5
  SHA512:
6
- metadata.gz: 79d274d0f02d4643bc1c1338f5abd61f2e4e4b59811aa9a7db2dd439087d76d52848f436958039820b9d28f21649f631cc97d46e413eac4ee8afe9bdcc465116
7
- data.tar.gz: 3662dc9fda69dd2795f468050b0c932c03a66f39b456e44dc35e15f6c0c159a15abccb192cfcc0eeb47872852f4dbcc8af44a64dcd720796108bcba657d27dd4
6
+ metadata.gz: ddaeba8c423ca4c44284b448019161f6a287d11e3bd721b006e2c499ac096d9901be16f43511a9a6a337a3ad7b79a3cb727ff4e4a1d25f43c3e141201ef6c6ea
7
+ data.tar.gz: f20c5628b950ac5f4f5188a71ec714b5662b1340ac331d6bc073f78247f1df42edcde89f58823642a9dc75bb358499e202fc78842f3761d362ba8e4cd1e5c094
data/lib/paru/pandoc.rb CHANGED
@@ -254,25 +254,18 @@ module Paru
254
254
  :data_dir => data_dir
255
255
  }
256
256
 
257
- # Load the options for the appropriate major version of pandoc
258
- if not [1, 2].include? major_version
259
- throw Error.new "Unknown major pandoc version: '#{major_version}'. Expected the major version to be '1' or '2'. Please check the pandoc path: '#{@@pandoc_exec}'."
260
- # defaults to version 1
261
- major_version = 2
262
- end
263
-
264
257
  # For each pandoc command line option a method is defined as follows:
265
- OPTIONS = YAML.load_file File.join(__dir__, "pandoc_options_version_#{major_version}.yaml")
258
+ OPTIONS = YAML.load_file File.join(__dir__, "pandoc_options.yaml")
266
259
 
267
- OPTIONS.keys.each do |option|
260
+ OPTIONS.each_pair do |option, default|
268
261
  if OPTIONS[option].is_a? Array then
269
262
 
270
263
  # option can be set multiple times, for example adding multiple css
271
264
  # files
272
265
 
273
- default = OPTIONS[option][0]
274
-
275
266
  define_method(option) do |value = default|
267
+ value = [] if value.nil?
268
+
276
269
  if @options[option].nil? then
277
270
  @options[option] = []
278
271
  end
@@ -291,6 +284,8 @@ module Paru
291
284
 
292
285
  default = OPTIONS[option]
293
286
  define_method(option) do |value = default|
287
+ value = default if value.nil?
288
+
294
289
  @options[option] = value
295
290
  self
296
291
  end
data/lib/paru.rb CHANGED
@@ -18,5 +18,5 @@
18
18
  #++
19
19
  module Paru
20
20
  # Paru's current version
21
- VERSION = [0, 4, 2, 5]
21
+ VERSION = [0, 4, 3]
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2.5
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huub de Beer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-11 00:00:00.000000000 Z
11
+ date: 2021-11-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Control pandoc with Ruby and write pandoc filters in Ruby
14
14
  email: Huub@heerdebeer.org
@@ -95,8 +95,7 @@ files:
95
95
  - lib/paru/filter_error.rb
96
96
  - lib/paru/pandoc.rb
97
97
  - lib/paru/pandoc2yaml.rb
98
- - lib/paru/pandoc_options_version_1.yaml
99
- - lib/paru/pandoc_options_version_2.yaml
98
+ - lib/paru/pandoc_options.yaml
100
99
  - lib/paru/selector.rb
101
100
  homepage: https://heerdebeer.org/Software/markdown/paru/
102
101
  licenses:
@@ -117,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
116
  - !ruby/object:Gem::Version
118
117
  version: '0'
119
118
  requirements: []
120
- rubygems_version: 3.2.22
119
+ rubygems_version: 3.2.3
121
120
  signing_key:
122
121
  specification_version: 4
123
122
  summary: Paru is a ruby wrapper around pandoc
@@ -1,112 +0,0 @@
1
- #--
2
- # Copyright 2015, 2016, 2017 Huub de Beer <Huub@heerdebeer.org>
3
- #
4
- # This file is part of Paru
5
- #
6
- # Paru is free software: you can redistribute it and/or modify
7
- # it under the terms of the GNU General Public License as published by
8
- # the Free Software Foundation, either version 3 of the License, or
9
- # (at your option) any later version.
10
- #
11
- # Paru is distributed in the hope that it will be useful,
12
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU General Public License for more details.
15
- #
16
- # You should have received a copy of the GNU General Public License
17
- # along with Paru. If not, see <http://www.gnu.org/licenses/>.
18
- # See http://pandoc.org/README.html for an overview of all options
19
- #++
20
- # Options for pandoc version 1.x, in order of occurrence in the pandoc manual.
21
- # General options
22
- from: ""
23
- read: ""
24
- to: ""
25
- write: ""
26
- output: ""
27
- data_dir: ""
28
- list_input_formats: true
29
- list_output_formats: true
30
- list_extensions: true
31
- list_highlight_languages: true
32
- list_highlight_styles: true
33
- version: true
34
- # Reader options
35
- parse_raw: true
36
- smart: true
37
- old_dashes: true
38
- base_header_level: 1
39
- indented_code_classes: ""
40
- default_image_extension: ""
41
- file_scope: true
42
- filter: [""]
43
- metadata: [""]
44
- normalize: true
45
- preserve_tabs: true
46
- tab_stop: 4
47
- track_changes: "accept"
48
- extract_media: true
49
- # General writer options
50
- standalone: true
51
- template: ""
52
- variable: [""]
53
- print_default_template: ""
54
- print_default_data_file: ""
55
- dpi: 96
56
- wrap: "auto"
57
- no_wrap: true
58
- columns: 78
59
- toc: true
60
- table_of_contents: true
61
- toc_depth: 3
62
- no_highlight: true
63
- highlight_style: "pygments"
64
- include_in_header: [""]
65
- include_before_body: [""]
66
- include_after_body: [""]
67
- # Options affecting specific writers
68
- self_contained: true
69
- html_q_tags: true
70
- ascii: true
71
- reference_links: true
72
- reference_location: "document"
73
- atx_headers: true
74
- chapters: true
75
- top_level_division: "section"
76
- number_sections: true
77
- number_offset: "0"
78
- no_tex_ligatures: true
79
- listings: true
80
- incremental: true
81
- slide_level: 1
82
- section_divs: true
83
- email_obfuscation: "none"
84
- id_prefix: ""
85
- title_prefix: ""
86
- css: [""]
87
- reference_odt: ""
88
- reference_docx: ""
89
- epub_stylesheet: "epub.css"
90
- epub_cover_image: ""
91
- epub_metadata: ""
92
- epub_embed_font: ""
93
- epub_chapter_level: 1
94
- latex_engine: "pdflatex"
95
- latex_engine_opt: [""]
96
- # Citation rendering
97
- bibliography: ""
98
- csl: ""
99
- citation_abbreviations: ""
100
- natbib: true
101
- biblatex: true
102
- # Math rendering in HTML
103
- latexmathml: ""
104
- mathml: ""
105
- jsmath: ""
106
- mathjax: ""
107
- gladtex: true
108
- mimetex: ""
109
- webtex: ""
110
- katex: ""
111
- katex_stylesheet: ""
112
- #--