paru 0.3.2.2 → 0.4.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a58dd9e8f88cd0c19eac00026a1612f63811333d4abe59f685a82106d7ada328
4
- data.tar.gz: 34ea8acb4cb0b1d585e02bfdfcfa41749098e3562d9dd914f92be9a6ab76ae21
3
+ metadata.gz: 9bacd79673b9d742566ebcd165a0cd164130c42a0528d6ba73e41c28d0cc0e9c
4
+ data.tar.gz: a5fa86dbb94337d2edd1538a0e14d718612536b77da3b26a327ca05063b8a81f
5
5
  SHA512:
6
- metadata.gz: d52164c0a6a9a0b2e041c4eaac7667fd02e36ab5d6d5eefdb518f3e85b1713164b3a0156b2c987c3ca652e4832b8723033cbb2d8904f31d10244c94a571edebd
7
- data.tar.gz: 587b32339694a764ac452503966c8286e38c15d0cff3783f39d61253c206b87d6c25245b9a2d0f49cf914c3a1a08dd45df00dff3c5b922c55ff81c635197a966
6
+ metadata.gz: 770a70f3fb172c7c4875ddf036f52f75cc40e6b58cfcc444d0cd31a44e21492f652068d5f5ea4ba30aad74ed98d22baff3371688f62f8e28a30603bfde5f0c8a
7
+ data.tar.gz: ed4c7672f0ad7ab24ebb4657660d4ce4e8e6aeb416808e7e8ad71fc7fc5f2073a30ce7f1f415fa7cbf7665722e32fb16fa45eb7cc4e660fbf9e87a5487f0ee1c
@@ -16,7 +16,7 @@ parser = OptionParser.new do |opts|
16
16
  end
17
17
 
18
18
  opts.on("-v", "--version", "Show version") do
19
- puts "do-pandoc.rb is part of paru version 0.2.3"
19
+ puts "do-pandoc.rb is part of paru version 0.4.0.1"
20
20
  exit
21
21
  end
22
22
  end
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright 2015, 2016, 2017 Huub de Beer <Huub@heerdebeer.org>
2
+ # Copyright 2015, 2016, 2017, 2018, 2019 Huub de Beer <Huub@heerdebeer.org>
3
3
  #
4
4
  # This file is part of Paru
5
5
  #
@@ -18,5 +18,5 @@
18
18
  #++
19
19
  module Paru
20
20
  # Paru's current version
21
- VERSION = [0, 3, 2, 2]
21
+ VERSION = [0, 4, 0, 2]
22
22
  end
@@ -36,7 +36,7 @@ module Paru
36
36
 
37
37
  # The current pandoc type version
38
38
  # @see https://hackage.haskell.org/package/pandoc-types
39
- CURRENT_PANDOC_VERSION = [1, 17, 2]
39
+ CURRENT_PANDOC_VERSION = [1, 20]
40
40
 
41
41
  # Each file that is being filtered by pandoc is represented by a root
42
42
  # Document. It is the root node of the AST of the document in the file.
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright 2015, 2016, 2017 Huub de Beer <Huub@heerdebeer.org>
2
+ # Copyright 2015, 2016, 2017, 2020 Huub de Beer <Huub@heerdebeer.org>
3
3
  #
4
4
  # This file is part of Paru
5
5
  #
@@ -26,12 +26,12 @@ module Paru
26
26
  # A Paru::Pandoc converter from JSON to markdown
27
27
  AST2MARKDOWN = Paru::Pandoc.new do
28
28
  from "json"
29
- to "markdown"
29
+ to "markdown-smart"
30
30
  end
31
31
 
32
32
  # A Paru::Pandoc converter from markdown to JSON
33
33
  MARKDOWN2JSON = Paru::Pandoc.new do
34
- from "markdown"
34
+ from "markdown+smart"
35
35
  to "json"
36
36
  end
37
37
 
@@ -27,6 +27,7 @@ to: ""
27
27
  write: ""
28
28
  output: ""
29
29
  data_dir: ""
30
+ defaults: ""
30
31
  bash_completion: true
31
32
  verbose: true
32
33
  quiet: true
@@ -34,7 +35,7 @@ fail_if_warnings: true
34
35
  log: ""
35
36
  list_input_formats: true
36
37
  list_output_formats: true
37
- list_extensions: true
38
+ list_extensions: ""
38
39
  list_highlight_languages: true
39
40
  list_highlight_styles: true
40
41
  version: true
@@ -42,14 +43,14 @@ help: true
42
43
  #####
43
44
  # General reader options:
44
45
  #####
45
- base_header_level: 1
46
+ shift_heading_level_by: 1
46
47
  indented_code_classes: ""
47
48
  default_image_extension: ""
48
49
  file_scope: true
49
50
  filter: [""]
50
51
  lua_filter: [""]
51
52
  metadata: [""]
52
- metadata-file: ""
53
+ metadata_file: [""]
53
54
  preserve_tabs: true
54
55
  tab_stop: 4
55
56
  track_changes: "accept"
@@ -67,14 +68,14 @@ eol: "native"
67
68
  dpi: 96
68
69
  wrap: "auto"
69
70
  columns: 78
70
- strip-comments: true
71
+ strip_comments: true
71
72
  toc: true
72
73
  table_of_contents: true
73
74
  toc_depth: 3
74
75
  strip_comments: true
75
76
  no_highlight: true
76
77
  highlight_style: ""
77
- print-highlight-style: ""
78
+ print_highlight_style: ""
78
79
  syntax_definition: ""
79
80
  include_in_header: [""]
80
81
  include_before_body: [""]
@@ -108,7 +109,7 @@ epub_metadata: ""
108
109
  epub_embed_font: ""
109
110
  epub_chapter_level: 1
110
111
  epub_subdirectory: ""
111
- ipynb-output: "best"
112
+ ipynb_output: "best"
112
113
  pdf_engine: "pdflatex"
113
114
  pdf_engine_opt: [""]
114
115
  #####
@@ -122,16 +123,11 @@ biblatex: true
122
123
  #####
123
124
  # Math rendering in HTML
124
125
  #####
125
- asciimathml: ""
126
- latexmathml: ""
127
- mathml: true
128
- jsmath: ""
129
126
  mathjax: ""
130
- gladtex: true
131
- mimetex: ""
127
+ mathml: true
132
128
  webtex: ""
133
129
  katex: ""
134
- katex_stylesheet: ""
130
+ gladtex: true
135
131
  #####
136
132
  # Options for wrapper scripts
137
133
  #####
@@ -59,8 +59,10 @@ module Paru
59
59
  private
60
60
 
61
61
  S = /\s*/
62
- TYPE = /(?<type>(?<name>[A-Z][a-zA-Z]*)(?<classes>(\.[a-zA-Z-]+)*))/
63
- OTHER_TYPE = /(?<other_type>(?<other_name>[A-Z][a-zA-Z]*)(?<other_classes>(\.[a-zA-Z-]+)*))/
62
+ # Improved CSS class selector taken from https://stackoverflow.com/questions/448981/which-characters-are-valid-in-css-class-names-selectors/449000#449000
63
+ CLASS = /(\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*)/
64
+ TYPE = /(?<type>(?<name>[A-Z][a-zA-Z]*)(?<classes>#{CLASS}*))/
65
+ OTHER_TYPE = /(?<other_type>(?<other_name>[A-Z][a-zA-Z]*)(?<other_classes>#{CLASS}*))/
64
66
  OPERATOR = /(?<operator>\+|-|>)/
65
67
  DISTANCE = /(?<distance>[1-9][0-9]*)/
66
68
  RELATION = /(?<relation>#{S}#{OTHER_TYPE}#{S}#{OPERATOR}#{S}#{DISTANCE}?#{S})/
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2.2
4
+ version: 0.4.0.2
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: 2019-07-21 00:00:00.000000000 Z
11
+ date: 2020-06-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Use Pandoc (http://www.pandoc.org) with ruby
13
+ description: Control pandoc with Ruby and write pandoc filters in Ruby
14
14
  email: Huub@heerdebeer.org
15
15
  executables:
16
16
  - pandoc2yaml.rb
@@ -99,7 +99,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
- version: '2.4'
102
+ version: '2.5'
103
103
  required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
105
  - - ">="