-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#429 More correct implementation of break-word.
Take two, with additional tests.
- Loading branch information
Showing
7 changed files
with
203 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+9.2 KB
openhtmltopdf-examples/src/main/resources/visualtest/expected/issue-429-break-word-extra.pdf
Binary file not shown.
49 changes: 49 additions & 0 deletions
49
openhtmltopdf-examples/src/main/resources/visualtest/html/issue-429-break-word-extra.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<html> | ||
<head> | ||
<style> | ||
@page { | ||
size: 100mm 25cm; | ||
} | ||
body, td { | ||
border: 1px solid black; | ||
} | ||
table, .wrap { | ||
word-wrap: break-word; | ||
} | ||
</style> | ||
</head> | ||
<body style="font-family: monospace;"> | ||
|
||
<div class="wrap"> | ||
FirstWordTooLongForLineSoItShouldWrap MiddleWordTooLongForLineSoItShouldWrap LastWordTooLongForLineSoItShouldWrap | ||
</div><br/> | ||
|
||
<div class="wrap"> | ||
First Word Too Long For Line So It Should MiddleWordTooLongForLineSoItShouldWrap LastWordTooLongForLineSoItShouldWrap | ||
</div><br/> | ||
|
||
<div class="wrap"> | ||
First Word Too Long For Line So It Should MiddleWordTooLongForLineSoItShouldWrap Last Word Too Long For Line So It Should | ||
</div><br/> | ||
|
||
<div class="wrap"> | ||
FirstWordNotTooLongForLineSoIt FirstWordNotTooLongForLineSoIt FirstWordNotTooLongForLineSoIt FirstWordNotTooLongForLineSoIt | ||
</div><br/> | ||
|
||
<div class="wrap"> | ||
FirstWordNotTooLongForLine <b>FirstWordNotTooLongForLine</b> <b><i>FirstWordNotTooLongForLineSoIt FirstWordNotTooLongForLineSoIt</i></b> | ||
</div><br/> | ||
|
||
<div class="wrap"> | ||
One two three FirstWordNotTooLongForLineSoIt four five FirstWordNotTooLongForLineSoIt six seven FirstWordNotTooLongForLineSoIt eight FirstWordNotTooLongForLineSoIt | ||
</div><br/> | ||
|
||
<table> | ||
<tr><td>OneTwoThreeFour</td><td>Five six seven</td><td>Eight nine</td></tr> | ||
<tr><td>One Two Three Four</td><td>Fivesixseven</td><td>Eight nine</td></tr> | ||
<tr><td>One Two Three Four</td><td>Five six seven</td><td>Eightnine</td></tr> | ||
<tr><td>OneTwoThreeFour</td><td>Fivesixseven</td><td>Eightnine</td></tr> | ||
</table> | ||
|
||
</body> | ||
</html> |
32 changes: 32 additions & 0 deletions
32
...mltopdf-examples/src/main/resources/visualtest/html/issue-429-break-word-with-floats.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<html> | ||
<head> | ||
<style> | ||
@page { | ||
size: 60mm 20cm; | ||
margin: 0; | ||
} | ||
body { | ||
word-wrap: break-word; | ||
margin: 0; | ||
max-width: 60mm; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div> | ||
<div style="width: 50%; height: 30px; background-color: red;float: left;"></div>Some words some more. | ||
FirstWordTooLongForLineSoItShouldWrap MiddleWordTooLongForLineSoItShouldWrap LastWordTooLongForLineSoItShouldWrap | ||
</div> | ||
|
||
<div style="clear:both;"></div> | ||
|
||
<div> | ||
<div style="width: 50%; height: 30px; background-color: red;float: right;"></div> | ||
FirstWordTooLongForLineSoItShouldWrap MiddleWordTooLongForLineSoItShouldWrap LastWordTooLongForLineSoItShouldWrap | ||
</div> | ||
|
||
<div style="clear:both;"></div> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.