-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep inline elements together even when inside a text (#141)
Fixes #139 The real change in the code is having extractOutermostNewlines run on each batched node individually, rather than all of them as a group. This pulls up line nodes one level higher, outside of the flow they'd otherwise be in.
- Loading branch information
1 parent
cc11b6f
commit 7583d0a
Showing
4 changed files
with
38 additions
and
26 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
6 changes: 5 additions & 1 deletion
6
test/formatting/samples/no-html-whitespace-inside-inline-element/output.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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
<p> | ||
<b>Apples</b>, <b>Orange</b>, <b>Bananas</b>, <b>Pineapples</b>, <b>Grapefruit</b>, | ||
<b>Apples</b>, | ||
<b>Orange</b>, | ||
<b>Bananas</b>, | ||
<b>Pineapples</b>, | ||
<b>Grapefruit</b>, | ||
<b>Kiwi</b> | ||
</p> |
7 changes: 7 additions & 0 deletions
7
test/printer/samples/element-with-text-and-inline-element.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,7 @@ | ||
<div> | ||
<p> | ||
This is line A. | ||
<b>This is B. len(A + B) > 80+ chars. len(b) lt; 80.</b> | ||
</p> | ||
<p>This is line A. <b>This is B. len(A + B) < 80 chars.</b></p> | ||
</div> |