mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Improve debug logging of non-printable chars
This commit is contained in:
parent
86778a0d71
commit
587314e52b
1 changed files with 2 additions and 2 deletions
|
@ -228,11 +228,11 @@ impl fmt::Debug for SpecificFragmentInfo {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
match *self {
|
match *self {
|
||||||
SpecificFragmentInfo::ScannedText(ref info) => {
|
SpecificFragmentInfo::ScannedText(ref info) => {
|
||||||
write!(f, "\"{}\"", slice_chars(&*info.run.text, info.range.begin().get() as usize,
|
write!(f, "{:?}", slice_chars(&*info.run.text, info.range.begin().get() as usize,
|
||||||
info.range.end().get() as usize))
|
info.range.end().get() as usize))
|
||||||
}
|
}
|
||||||
SpecificFragmentInfo::UnscannedText(ref info) => {
|
SpecificFragmentInfo::UnscannedText(ref info) => {
|
||||||
write!(f, "\"{}\"", info.text)
|
write!(f, "{:?}", info.text)
|
||||||
}
|
}
|
||||||
_ => Ok(())
|
_ => Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue