paru 1.1.1 → 1.1.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 +4 -4
- data/lib/paru/filter/col_spec.rb +5 -5
- data/lib/paru/filter/table.rb +3 -3
- data/lib/paru/filter/value.rb +3 -3
- data/lib/paru.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5fdb8848444eeca6165736f3f0aa78109097a49153e8fe397d2587098f4d2db
|
4
|
+
data.tar.gz: a013d3f067c34eefc32438cba227cef3e8aa086326c0a28c64aa90e4ef83778f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d24f3c3675ffeb08ecbdce00469cee0f28f5d9f006d28bbb4094aa1ea7b1d66f50de432126c4cb57217e2ad399de3ba8f3973d2eb3578b3edfe06fa0e971bb3
|
7
|
+
data.tar.gz: 1f8b3b165bb57273d56b916b6070159771a6873deee11e63379bd5fdfb91a90c8bc08d31be5d4f6c2e30fe9863bfd457f7be79b089ae8c1b113187149fb3e5ee
|
data/lib/paru/filter/col_spec.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright 2020 Huub de Beer <Huub@heerdebeer.org>
|
2
|
+
# Copyright 2020, 2032 Huub de Beer <Huub@heerdebeer.org>
|
3
3
|
#
|
4
4
|
# This file is part of Paru
|
5
5
|
#
|
@@ -28,7 +28,7 @@ module Paru
|
|
28
28
|
|
29
29
|
# Default value for a column specification: left aligned with default
|
30
30
|
# width
|
31
|
-
DEFAULT_COLSPEC = [{"t"
|
31
|
+
DEFAULT_COLSPEC = [{"t" => "AlignLeft"}, {"t" => COL_WIDTH_DEFAULT}]
|
32
32
|
|
33
33
|
# ColSpec represents a colspec definition for a table column. It contains an alignment and the column's width.
|
34
34
|
#
|
@@ -40,7 +40,7 @@ module Paru
|
|
40
40
|
# @!attribute width
|
41
41
|
# @return [Double|COL_WIDTH_DEFAULT]
|
42
42
|
class ColSpec
|
43
|
-
|
43
|
+
attr_reader :alignment, :width
|
44
44
|
|
45
45
|
# Create a new ColSpec object
|
46
46
|
#
|
@@ -56,9 +56,9 @@ module Paru
|
|
56
56
|
# "ColWidthDefault", it uses the default value.
|
57
57
|
def width=(new_width)
|
58
58
|
if new_width == "ColWidthDefault" then
|
59
|
-
@width = Value.new({"t"
|
59
|
+
@width = Value.new({"t" => new_width})
|
60
60
|
else
|
61
|
-
@width = Value.new({"t"
|
61
|
+
@width = Value.new({"t" => "ColWidth", "c" => new_width})
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
data/lib/paru/filter/table.rb
CHANGED
@@ -39,13 +39,13 @@ module Paru
|
|
39
39
|
# @return Attr
|
40
40
|
#
|
41
41
|
# @!attribute colspec
|
42
|
-
# @return [
|
42
|
+
# @return ColSpec[]
|
43
43
|
#
|
44
44
|
# @!attribute head
|
45
|
-
# @return [
|
45
|
+
# @return TableHead[]
|
46
46
|
#
|
47
47
|
# @!attribute foot
|
48
|
-
# @return [
|
48
|
+
# @return TableHead[]
|
49
49
|
class Table < Block
|
50
50
|
attr_accessor :caption, :attr, :colspec, :head, :foot
|
51
51
|
|
data/lib/paru/filter/value.rb
CHANGED
@@ -35,10 +35,10 @@ module Paru
|
|
35
35
|
# @param contents [Array<pandoc node in JSON> = []] the contents of
|
36
36
|
# this node
|
37
37
|
def initialize(contents)
|
38
|
-
@type = contents[
|
38
|
+
@type = contents['t']
|
39
39
|
|
40
|
-
if contents.has_key?
|
41
|
-
@value = contents[
|
40
|
+
if contents.has_key? 'c' then
|
41
|
+
@value = contents['c']
|
42
42
|
else
|
43
43
|
@value = VALUE_ENCODED_IN_TYPE_NAME
|
44
44
|
end
|
data/lib/paru.rb
CHANGED
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: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Huub de Beer
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-30 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
|
@@ -103,7 +103,7 @@ homepage: https://heerdebeer.org/Software/markdown/paru/
|
|
103
103
|
licenses:
|
104
104
|
- GPL-3.0
|
105
105
|
metadata: {}
|
106
|
-
post_install_message:
|
106
|
+
post_install_message:
|
107
107
|
rdoc_options: []
|
108
108
|
require_paths:
|
109
109
|
- lib
|
@@ -118,8 +118,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
|
-
rubygems_version: 3.4.
|
122
|
-
signing_key:
|
121
|
+
rubygems_version: 3.4.1
|
122
|
+
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: Paru is a ruby wrapper around pandoc
|
125
125
|
test_files: []
|