kramdown-converter-pdf 1.0.4 → 1.0.5

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: 9cc457ab6b70e1bf7ee4402e2ef9f4729fa18f71685725d5c51cc475bee6316e
4
- data.tar.gz: 24b7bd39ed1d585103e429b1d566eb69794f7ae99c648357874ff195f80c0d51
3
+ metadata.gz: e660d7fce011739ca876132fd928632b3f194d73f2f7b8da4354eb41d0df2032
4
+ data.tar.gz: 2d9ae615bc0292729860b027cae2289877bafb0d35a543866144d6d7fe47c086
5
5
  SHA512:
6
- metadata.gz: 54429078864b8ec23796f7d095951a9a06cf54782ccd42b900246c63ddbb77f9b6529b575dea5f40fe2df5f86cb09362bcf9c1a99fdba397c43447f90922db86
7
- data.tar.gz: 6f0f211e58617074b2e92f907cb14ce7347e39ad675dce5a2227a0b240dcbf7ca9a88c14ba8b1f05ba08da3ca0d5e931d06a9c00f07137b451743562c1beffd4
6
+ metadata.gz: 2b8dd46681de42c3927e9b1eed78445ce920a798f89f96ed32345d7a005f14c9822b811a66dc6ed5a51828eaaab71f183170571f3bfca35e131088b022496c91
7
+ data.tar.gz: ec537406b3db74e617ae1d55531d0669f55acf9bb84a6cef331c1a75cbf42c2bd16369dd1a7d4da12616b3e7f8d60a36a6fbe49c0aed38199b47cda47202e694
@@ -1,4 +1,6 @@
1
1
  Count Name
2
2
  ======= ====
3
- 10 Thomas Leitner <t_leitner@gmx.at>
3
+ 11 Thomas Leitner <t_leitner@gmx.at>
4
+ 2 Matthew Dodds <matthew.dodds@powerhrg.com>
5
+ 1 Matthew Russell Dodds <matthewrusselldodds@gmail.com>
4
6
  1 Carlos Palhares <chjunior@gmail.com>
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.4
1
+ 1.0.5
@@ -43,7 +43,7 @@ module Kramdown
43
43
  #
44
44
  class Pdf < Base
45
45
 
46
- VERSION = '1.0.4'
46
+ VERSION = '1.0.5'
47
47
 
48
48
  include Prawn::Measurements
49
49
 
@@ -162,7 +162,15 @@ module Kramdown
162
162
  retry
163
163
  end
164
164
 
165
- options = {position: :center}
165
+ options = {}
166
+ if img.attr['class'] =~ /\balign\-left\b/
167
+ options[:position] = :left
168
+ elsif img.attr['class'] =~ /\balign\-right\b/
169
+ options[:position] = :right
170
+ else
171
+ options[:position] = :center
172
+ end
173
+
166
174
  if img.attr['height'] && img.attr['height'] =~ /px$/
167
175
  options[:height] = img.attr['height'].to_i / (@options[:image_dpi] || 150.0) * 72
168
176
  elsif img.attr['width'] && img.attr['width'] =~ /px$/
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kramdown-converter-pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Leitner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-15 00:00:00.000000000 Z
11
+ date: 2021-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 3.0.3
85
+ rubygems_version: 3.1.2
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: kramdown-converter-pdf uses Prawn to convert a kramdown document to PDF