fix: clamp End alignment firstLine to 0 instead of falling back to Start#682
Merged
MohamedRejeb merged 1 commit intomainfrom Apr 24, 2026
Merged
fix: clamp End alignment firstLine to 0 instead of falling back to Start#682MohamedRejeb merged 1 commit intomainfrom
MohamedRejeb merged 1 commit intomainfrom
Conversation
The per-item fallback made items in a single list pick different TextIndent formulas based on their marker width, so a list with both "1." and "viii." would visually shift between layouts. Clamp firstLine to >= 0 under End alignment and keep restLine at the base: every item shares the same formula and narrow markers still get the classic hanging indent.
renovate Bot
added a commit
to r0adkll/Campfire
that referenced
this pull request
Apr 27, 2026
…1.0.0-rc14 (#755) This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [com.mohamedrejeb.richeditor:richeditor-compose](https://redirect.github.com/MohamedRejeb/Compose-Rich-Editor) | `1.0.0-rc13` → `1.0.0-rc14` |  |  | --- > [!WARNING] > Some dependencies could not be looked up. Check the [Dependency Dashboard](../issues/15) for more information. --- ### Release Notes <details> <summary>MohamedRejeb/Compose-Rich-Editor (com.mohamedrejeb.richeditor:richeditor-compose)</summary> ### [`v1.0.0-rc14`](https://redirect.github.com/MohamedRejeb/compose-rich-editor/releases/tag/v1.0.0-rc14) #### What's Changed - Migrate project to Java 17, Gradle 9.0, Kotlin 2.3.20, Compose 1.10.3 by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#647](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/647) - feat: rich text copy/paste support by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#650](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/650) - Fix StringIndexOutOfBoundsException for Rich Text Editor by [@​rguzman1-godaddy](https://redirect.github.com/rguzman1-godaddy) in [MohamedRejeb/compose-rich-editor#638](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/638) - Add comprehensive OffsetMapping tests for RichTextState operations by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#651](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/651) - Support `start` attribute for ordered lists in HTML parsing and rendering by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#653](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/653) - Fix HTML parsing for line breaks within paragraphs by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#654](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/654) - Fix `<br>` handling in inline elements and preserve parent span styles by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#655](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/655) - fix: handle IME revert, selection replacement, and cross-paragraph prefix removal by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#658](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/658) - fix: typing garbled next to image spans ([#​466](https://redirect.github.com/MohamedRejeb/Compose-Rich-Editor/issues/466)) by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#661](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/661) - fix: preserve \* bullet markers in markdown input ([#​637](https://redirect.github.com/MohamedRejeb/Compose-Rich-Editor/issues/637)) by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#663](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/663) - feat: add minLines parameter to material3 RichText ([#​643](https://redirect.github.com/MohamedRejeb/Compose-Rich-Editor/issues/643)) by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#670](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/670) - feat: add mentions/triggers with atomic token spans ([#​45](https://redirect.github.com/MohamedRejeb/Compose-Rich-Editor/issues/45), [#​252](https://redirect.github.com/MohamedRejeb/Compose-Rich-Editor/issues/252)) by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#671](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/671) - feat: implement undo/redo history system for rich text editor by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#673](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/673) - Fix indent for orderedlist paragraph by [@​DavidPerezP124](https://redirect.github.com/DavidPerezP124) in [MohamedRejeb/compose-rich-editor#636](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/636) - fix: preserve dot-aligned list indent while keeping prefix visible by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#677](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/677) - feat: add ListMarkerStyleBehavior to control list marker style inheritance by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#678](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/678) - feat: add ListPrefixAlignment for customizable list marker alignment by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#680](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/680) - fix: keep raw text and list prefixes in sync on config change by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#681](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/681) - fix: clamp End alignment firstLine to 0 instead of falling back to Start by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#682](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/682) - fix: stabilize inline images across rebuilds (RichSpanStyle.Image) by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#685](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/685) - fix: strip inline-content placeholder char from image serialization by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#686](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/686) - sample: add Images and Links sample screens showcasing rich text editor capabilities by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#687](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/687) - sample: add GitHub demo screen and other improvements by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#690](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/690) - fix: rebuild annotated string on selection change when mask applies ([#​635](https://redirect.github.com/MohamedRejeb/Compose-Rich-Editor/issues/635)) by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#691](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/691) - Feature/mention click by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#692](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/692) - Implement Heading Styles (H1-H6) by [@​DevinDuricka](https://redirect.github.com/DevinDuricka) in [MohamedRejeb/compose-rich-editor#589](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/589) - test: add unit tests for `RichTextState.setText` preserving raw text literals by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#695](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/695) - test: add unit tests for Markdown parser's bold-italic bullet handling by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#696](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/696) - fix: emit blank line before list block in markdown decode ([#​441](https://redirect.github.com/MohamedRejeb/Compose-Rich-Editor/issues/441)) by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#697](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/697) - sample: add Claude-themed demo with rich text commands and streaming by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#698](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/698) - fix: cache list prefix widths to avoid first-frame indent flicker by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#699](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/699) - feat: add ExpandableBasicRichText with inline see more / see less ([#​450](https://redirect.github.com/MohamedRejeb/Compose-Rich-Editor/issues/450)) by [@​MohamedRejeb](https://redirect.github.com/MohamedRejeb) in [MohamedRejeb/compose-rich-editor#701](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/701) #### Some screenshots from sample: <img width="796" height="569" alt="Screenshot 2026-04-26 at 10 53 32 PM" src="https://github.com/user-attachments/assets/6bce5ab6-46ef-4037-bc74-6943fe912cb1" /> <img width="797" height="568" alt="Screenshot 2026-04-26 at 10 53 58 PM" src="https://github.com/user-attachments/assets/76a207e0-a34c-40d2-9a3e-5bff06bf717e" /> <img width="796" height="568" alt="Screenshot 2026-04-26 at 10 55 33 PM" src="https://github.com/user-attachments/assets/20bd1bbd-b954-4967-b44c-caee39730aa4" /> #### New Contributors * @​rguzman1-godaddy made their first contributi[https://github.com/MohamedRejeb/compose-rich-editor/pull/638](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/638)ll/638 * @​DavidPerezP124 made their first contributi[https://github.com/MohamedRejeb/compose-rich-editor/pull/636](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/636)ll/636 * @​DevinDuricka made their first contributi[https://github.com/MohamedRejeb/compose-rich-editor/pull/589](https://redirect.github.com/MohamedRejeb/compose-rich-editor/pull/589)ll/589 **Full Changelog**: <MohamedRejeb/compose-rich-editor@v1.0.0-rc13...v1.0.0-rc14> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/r0adkll/Campfire). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNDEuMyIsInVwZGF0ZWRJblZlciI6IjQzLjE0MS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.
The per-item fallback made items in a single list pick different TextIndent formulas based on their marker width, so a list with both "1." and "viii." would visually shift between layouts. Clamp firstLine to >= 0 under End alignment and keep restLine at the base: every item shares the same formula and narrow markers still get the classic hanging indent.