Repository navigation
CMM-2466: Hide the auto-generated Reader excerpt for <br> posts - #23405
Merged
Merged
Conversation
…eaks The server drops <br> with no space when building the excerpt, while fastStripHtml turns it into whitespace, so the "content starts with excerpt" check failed and the excerpt was shown.
Collaborator
Generated by 🚫 Danger |
Contributor
|
|
Contributor
|
|
This comment was marked as resolved.
This comment was marked as resolved.
Mocking the data class tripped the DoNotMockDataClass lint check.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #23405 +/- ##
==========================================
+ Coverage 38.62% 38.64% +0.02%
==========================================
Files 2301 2301
Lines 128055 128054 -1
Branches 18124 18123 -1
==========================================
+ Hits 49460 49492 +32
+ Misses 74494 74442 -52
- Partials 4101 4120 +19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nbradbury
marked this pull request as ready for review
October 8, 2026 18:32
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


TL;DR
Fixes CMM-2466
In Reader post detail, posts written with Shift+Enter line breaks (
<br>) and no manual excerpt showed their whole text twice: once as the grey excerpt under the header, then as the content. This PR makes the auto-excerpt check ignore whitespace so that excerpt is hidden again.Before and After
Description
Fixes CMM-2466.
isAutoGeneratedExcerpthides an excerpt when the stripped post content starts with it.<br>with no space (thatthe).HtmlUtils.fastStripHtmlturns<br>into a newline, which then became a space (that the), sostartsWithfailed and the excerpt was treated as author-written.ReaderPostDetailsHeaderViewUiStateBuilderTest(the builder had no tests): an excerpt generated from<br>posts is hidden, and an author-written excerpt is still shown.The post from the original report now has a manual excerpt (
.), so it can't be used to verify the fix. Use a test post instead.Testing instructions