Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bb0ebb73d1f0a1d1be8137db528f9c06e595f1b7
      
https://github.com/WebKit/WebKit/commit/bb0ebb73d1f0a1d1be8137db528f9c06e595f1b7
  Author: Wenson Hsieh <[email protected]>
  Date:   2026-01-16 (Fri, 16 Jan 2026)

  Changed paths:
    M 
LayoutTests/fast/text-extraction/debug-text-extraction-markdown-expected.txt
    M LayoutTests/fast/text-extraction/debug-text-extraction-markdown.html
    M Source/WebKit/Shared/TextExtractionToStringConversion.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm

  Log Message:
  -----------
  [AutoFill Debugging] Markdown text extraction output contains unnecessary 
newlines
https://bugs.webkit.org/show_bug.cgi?id=305656
rdar://168313431

Reviewed by Abrar Rahman Protyasha.

Make a small adjustment to the markdown output format, when transforming text 
extraction items into
pure text. Instead of always emitting `\n` between different items, if the 
adjacent items share the
same block container index, we can instead emit a space (or none at all if 
there is already
whitespace, or the next character is a punctuation character).

* LayoutTests/fast/text-extraction/debug-text-extraction-markdown-expected.txt:

Rebaseline an existing test; also add an inline anchor element, to check that a 
space is inserted
between text and the start of a link.

* LayoutTests/fast/text-extraction/debug-text-extraction-markdown.html:
* Source/WebKit/Shared/TextExtractionToStringConversion.cpp:
(WebKit::shouldEmitExtraSpace):
(WebKit::TextExtractionAggregator::takeResults):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm:
(TestWebKitAPI::TEST(TextExtractionTests, NodesToSkip)):

Rebaseline another API test.

Canonical link: https://commits.webkit.org/305734@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to