bookify 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bookify/node/div.rb +10 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 568b049c2cbdcddecb4e5df93e71dd9d66b18a81
4
- data.tar.gz: 0ce2df2b59c6e6b273ce4bb6e087d848a2890c90
3
+ metadata.gz: 5ef41f4cbf6c797a2460410b134cafb9e8d5c7a9
4
+ data.tar.gz: f622fcebbcd308a40251fee0b26cbfb9661ccc65
5
5
  SHA512:
6
- metadata.gz: 5041d0ca09ae128b074fedf4cf722a8cb792629ad77597a9adef01811778918e7c1d7e7fe92ef42200a778e52a9ef877d30ac98f20d6e942555b047e51c41149
7
- data.tar.gz: 0583b0802fdd963c984df38322a3a593ce4ae1ef53b3e76ce4742ec25f2ffc2f4a6263ee9baea0831c2f9785a57d435a41b259527a7ff10a0fb9ebfbfb9a4e9f
6
+ metadata.gz: fb3014784bfac4cc7bedd7541a83b40193d82eb735e8382645d919129337ae354073ed0e4f70424386a0ccf98afafc9540ad23c1959217f610c140c9c71b4e56
7
+ data.tar.gz: ac7143bd205da99690c331c7eea6edbe14259c8e7ae3fb680507b695b466dee21f52933aaaaa07220920709b61a5fdce22d08a012ac9516a5d7c9e6c82dc196d
@@ -2,7 +2,16 @@ module Bookify::Node
2
2
  class Div < Base
3
3
  def render
4
4
  html_classes = (node.attr(:class) || "").split(" ")
5
- bounds.move_past_bottom if html_classes.include?("page-break")
5
+
6
+ if html_classes.include?("page-break")
7
+ if bounds.left == 0.0
8
+ 2.times { bounds.move_past_bottom }
9
+ else
10
+ bounds.move_past_bottom
11
+ end
12
+ elsif html_classes.include?("section-break")
13
+ bounds.move_past_bottom
14
+ end
6
15
  end
7
16
  end
8
17
  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.1.0
4
+ version: 0.1.1
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-25 00:00:00.000000000 Z
11
+ date: 2017-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake