mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Extend whitespace::T with additional helper methods
This commit is contained in:
parent
a5babb89a0
commit
7de7cb4786
5 changed files with 47 additions and 48 deletions
|
@ -40,7 +40,7 @@ fn text(fragments: &LinkedList<Fragment>) -> String {
|
|||
for fragment in fragments {
|
||||
match fragment.specific {
|
||||
SpecificFragmentInfo::UnscannedText(ref info) => {
|
||||
if fragment.white_space_preserve_newlines() {
|
||||
if fragment.white_space().preserve_newlines() {
|
||||
text.push_str(&info.text);
|
||||
} else {
|
||||
text.push_str(&info.text.replace("\n", " "));
|
||||
|
@ -411,7 +411,7 @@ fn split_first_fragment_at_newline_if_necessary(fragments: &mut LinkedList<Fragm
|
|||
let string_before;
|
||||
let insertion_point_before;
|
||||
{
|
||||
if !first_fragment.white_space_preserve_newlines() {
|
||||
if !first_fragment.white_space().preserve_newlines() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue