paru 0.3.2.2 → 0.4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/do-pandoc.rb +1 -1
- data/lib/paru.rb +2 -2
- data/lib/paru/filter/document.rb +1 -1
- data/lib/paru/filter/node.rb +3 -3
- data/lib/paru/pandoc_options_version_2.yaml +9 -13
- data/lib/paru/selector.rb +4 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bacd79673b9d742566ebcd165a0cd164130c42a0528d6ba73e41c28d0cc0e9c
|
4
|
+
data.tar.gz: a5fa86dbb94337d2edd1538a0e14d718612536b77da3b26a327ca05063b8a81f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 770a70f3fb172c7c4875ddf036f52f75cc40e6b58cfcc444d0cd31a44e21492f652068d5f5ea4ba30aad74ed98d22baff3371688f62f8e28a30603bfde5f0c8a
|
7
|
+
data.tar.gz: ed4c7672f0ad7ab24ebb4657660d4ce4e8e6aeb416808e7e8ad71fc7fc5f2073a30ce7f1f415fa7cbf7665722e32fb16fa45eb7cc4e660fbf9e87a5487f0ee1c
|
data/bin/do-pandoc.rb
CHANGED
data/lib/paru.rb
CHANGED
@@ -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,
|
21
|
+
VERSION = [0, 4, 0, 2]
|
22
22
|
end
|
data/lib/paru/filter/document.rb
CHANGED
@@ -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,
|
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.
|
data/lib/paru/filter/node.rb
CHANGED
@@ -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:
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
131
|
-
mimetex: ""
|
127
|
+
mathml: true
|
132
128
|
webtex: ""
|
133
129
|
katex: ""
|
134
|
-
|
130
|
+
gladtex: true
|
135
131
|
#####
|
136
132
|
# Options for wrapper scripts
|
137
133
|
#####
|
data/lib/paru/selector.rb
CHANGED
@@ -59,8 +59,10 @@ module Paru
|
|
59
59
|
private
|
60
60
|
|
61
61
|
S = /\s*/
|
62
|
-
|
63
|
-
|
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.
|
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:
|
11
|
+
date: 2020-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
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.
|
102
|
+
version: '2.5'
|
103
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
105
|
- - ">="
|