LibWeb+LibGfx: Apply editorial punctuation/whitespace/markup fixes

Corresponds to d426109ea1
and fd08f81d06
This commit is contained in:
Sam Atkins 2025-06-24 11:18:14 +01:00 committed by Shannon Booth
parent a35d14eab3
commit 423cdd447d
Notes: github-actions[bot] 2025-06-24 15:13:34 +00:00
35 changed files with 108 additions and 103 deletions

View file

@ -97,7 +97,8 @@ Optional<StringView> extract_character_encoding_from_meta_element(ByteString con
// https://html.spec.whatwg.org/multipage/parsing.html#concept-get-attributes-when-sniffing
GC::Ptr<DOM::Attr> prescan_get_attribute(DOM::Document& document, ByteBuffer const& input, size_t& position)
{
// 1. If the byte at position is one of 0x09 (HT), 0x0A (LF), 0x0C (FF), 0x0D (CR), 0x20 (SP), or 0x2F (/) then advance position to the next byte and redo this step.
// 1. If the byte at position is one of 0x09 (HT), 0x0A (LF), 0x0C (FF), 0x0D (CR), 0x20 (SP), or 0x2F (/),
// then advance position to the next byte and redo this step.
if (!prescan_skip_whitespace_and_slashes(input, position))
return {};
@ -145,7 +146,7 @@ GC::Ptr<DOM::Attr> prescan_get_attribute(DOM::Document& document, ByteBuffer con
}
spaces:
// 6. Spaces: If the byte at position is one of 0x09 (HT), 0x0A (LF), 0x0C (FF), 0x0D (CR), or 0x20 (SP)
// 6. Spaces: If the byte at position is one of 0x09 (HT), 0x0A (LF), 0x0C (FF), 0x0D (CR), or 0x20 (SP),
// then advance position to the next byte, then, repeat this step.
if (!prescan_skip_whitespace_and_slashes(input, position))
return {};
@ -159,7 +160,7 @@ spaces:
++position;
value:
// 9. Value: If the byte at position is one of 0x09 (HT), 0x0A (LF), 0x0C (FF), 0x0D (CR), or 0x20 (SP)
// 9. Value: If the byte at position is one of 0x09 (HT), 0x0A (LF), 0x0C (FF), 0x0D (CR), or 0x20 (SP),
// then advance position to the next byte, then, repeat this step.
if (!prescan_skip_whitespace_and_slashes(input, position))
return {};