-
-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using 2 columns style in different levels of the HTML lead to IndexError #981
Comments
Maybe it's another version of #984 |
I'm testing this with #956 |
The error is still there while testing with #956 and the master |
I tried to isolate the snippet that is causing the error. I figured out that a special character is one of the reasons to raise IndexError. Use case 1 (Failling with indexError):
<!DOCTYPE html>
<html>
<style>
.article {
font-family: Arial;
font-size: 15px;
}
.ref-list {
columns: 2;
column-gap: 0.5cm;
}
.ref-list .title {
column-span: all;
border-bottom: solid 2px gray;
text-transform: uppercase;
}
</style>
</head>
<body>
<div class="document">
<div class="article">
<div class="body_back">
<div class="back">
<div class="ref-list">
<div class="title">Références bibliographiques</div>
<ul>
<li class="ref">A<small>rlegi</small>, R. et M. T<small>eschl</small> (2014), « Conflict, Commitment and Well-Being » <i>in</i><small>Søraker</small>, J. H., J. W. <small>van</small><small>der</small> R<small>ijt</small>, J. B<small>oer</small>, P. H. W<small>ong</small> et P. B<small>rey</small> (éds), <i>Well-Being in Contemporary Society</i>, Cham, Springer.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</body>
</html> Use case 2 (Success):
<!DOCTYPE html>
<html>
<style>
.article {
font-family: Arial;
font-size: 15px;
}
.ref-list {
columns: 2;
column-gap: 0.5cm;
}
.ref-list .title {
column-span: all;
border-bottom: solid 2px gray;
text-transform: uppercase;
}
</style>
</head>
<body>
<div class="document">
<div class="article">
<div class="body_back">
<div class="back">
<div class="ref-list">
<div class="title">Références bibliographiques</div>
<ul>
<li class="ref">A<small>rlegi</small>, R. et M. T<small>eschl</small> (2014), « Conflict, Commitment and Well-Being » <i>in</i><small>Sraker</small>, J. H., J. W. <small>van</small><small>der</small> R<small>ijt</small>, J. B<small>oer</small>, P. H. W<small>ong</small> et P. B<small>rey</small> (éds), <i>Well-Being in Contemporary Society</i>, Cham, Springer.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</body>
</html> Use case 3 (Success):
<!DOCTYPE html>
<html>
<style>
.article {
font-family: Arial;
font-size: 15px;
}
.ref-list .title {
column-span: all;
border-bottom: solid 2px gray;
text-transform: uppercase;
}
</style>
</head>
<body>
<div class="document">
<div class="article">
<div class="body_back">
<div class="back">
<div class="ref-list">
<div class="title">Références bibliographiques</div>
<ul>
<li class="ref">A<small>rlegi</small>, R. et M. T<small>eschl</small> (2014), « Conflict, Commitment and Well-Being » <i>in</i><small>Søraker</small>, J. H., J. W. <small>van</small><small>der</small> R<small>ijt</small>, J. B<small>oer</small>, P. H. W<small>ong</small> et P. B<small>rey</small> (éds), <i>Well-Being in Contemporary Society</i>, Cham, Springer.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</body>
</html> Conclusion The combination of column-span and the special character is causing WeasyPrint to crash in IndexError Exception. Comments It is not clear to me why a special character should be responsible for this error. |
In the past there were all sorts of strange errors with strange characters... and there were strange errors with 'windowish' fonts on nix systems. My OS is Windows. That might be the reason why I cannot reproduce the IndexError with your snippet. I think it's |
Ah, finally your snippet crashes on my computer, too - WeasyPrint v50 and current master branch. But with a different error: As expected: My crash is fixed by #956. |
It is for me too. Let's close this. |
A simple CSS change to change the text style to 2 columns lead the convertion to a IndexError.
Working Package:
2columns-working.zip
Failing Package:
2columns-failing.zip
The only difference between one and another is the css bellow:
WeasyPrint Version: v50
Traceback :
The text was updated successfully, but these errors were encountered: