bookify 0.0.7 → 0.0.8

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
  SHA1:
3
- metadata.gz: d95b119127fcd71373739392978f53a4ec1ba840
4
- data.tar.gz: ddb111dc2a6f06ebe13b3ffbf6325c5c88de9785
3
+ metadata.gz: 91099905672401d107237ef7b62501ca5ae75205
4
+ data.tar.gz: 929e9aa6f13220100921d2dac7baa7a89ef072a0
5
5
  SHA512:
6
- metadata.gz: 50dace2867a4e91e0bafb2be6520af68f2fe74fe5ab70f1e80c89f7aeeed93b065a6a2e10d092fd80a4805f513953991d2e70a03f70174e60e4a9d39bf6b0981
7
- data.tar.gz: 65a80d40818b3f531a6ed1ca3f5db03cb7fd7cfd3446b643e13d3a96fbe787fbbdeb34d01da1ef89b649f1a52a555d89215b9b0d764117f430c5cc68dca88356
6
+ metadata.gz: a13b39b09306e28b5f425d3d4bd5734874924b63f8878c32c14ee9cfde2dfeb2de20bee224bb80dae77da51894b5f00192117de5823e627e85242bb46bb1fb38
7
+ data.tar.gz: bf66bca65531fd7966efd4d08d61afcb2e91865b2211adc0bbb7c318c1976f9edc8f72c340ad0fafd6ae0eed3da234a72cfa969803fed68a414b900887ac21dc
@@ -1,15 +1,13 @@
1
1
  module Bookify::Node
2
2
  class Paragraph < Base
3
3
  def render
4
- node.children.each do |child|
5
- if child.name == "text"
6
- html = clean_html(node.inner_html)
7
- font :primary
8
- text html, inline_format: true
9
- move_down 10
10
- else
11
- SUBCLASSES[child.name.to_sym].render(child, pdf)
12
- end
4
+ if node.children.count == 1 && node.children.first.name.to_sym == :img
5
+ SUBCLASSES[:img].render(node.children.first, pdf)
6
+ else
7
+ html = clean_html(node.inner_html)
8
+ font :primary
9
+ text html, inline_format: true
10
+ move_down 10
13
11
  end
14
12
  end
15
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joey Schoblaska
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-17 00:00:00.000000000 Z
11
+ date: 2017-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake