Commit 4c81663 committed Jun 11, 2024 · 7 / 7
1 parent 4617b94 commit 4c81663 Copy full SHA for 4c81663
File tree 2 files changed +53
-0
lines changed
2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,57 @@ def test_footnote_margin(assert_pixels):
123
123
<div>abc<span>d</span></div>''' )
124
124
125
125
126
+ @assert_no_logs
127
+ def test_footnote_multiple_margin (assert_pixels ):
128
+ assert_pixels ('''
129
+ RRRR___
130
+ RRRR___
131
+ RRRR___
132
+ RRRR___
133
+ RRRR___
134
+ RRRR___
135
+ RRRRRR_
136
+ RRRRRR_
137
+ _______
138
+ _______
139
+
140
+ RRRR___
141
+ RRRR___
142
+ _______
143
+ _______
144
+ _______
145
+ _______
146
+ RRRRRR_
147
+ RRRRRR_
148
+ RRRRRR_
149
+ RRRRRR_
150
+ ''' , '''
151
+ <style>
152
+ @font-face {src: url(weasyprint.otf); font-family: weasyprint}
153
+ @page {
154
+ size: 7px 10px;
155
+
156
+ @footnote {
157
+ margin-top: 1px;
158
+ }
159
+ }
160
+ div {
161
+ color: red;
162
+ font-family: weasyprint;
163
+ font-size: 2px;
164
+ line-height: 1;
165
+ }
166
+ span {
167
+ float: footnote;
168
+ }
169
+ </style>
170
+ <div>ab</div>
171
+ <div>ab</div>
172
+ <div>ab</div>
173
+ <div>a<span>d</span><span>e</span></div>
174
+ <div>ab</div>''' )
175
+
176
+
126
177
@assert_no_logs
127
178
def test_footnote_with_absolute (assert_pixels ):
128
179
assert_pixels ('''
Original file line number Diff line number Diff line change @@ -379,4 +379,6 @@ def _update_footnote_area(self):
379
379
return overflow
380
380
else :
381
381
self .current_footnote_area .height = 0
382
+ if not self .in_column :
383
+ self .page_bottom -= self .current_footnote_area .margin_height ()
382
384
return False
You can’t perform that action at this time.
0 commit comments