Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 335899: Split paragraph by BR before doing block format #2955

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JiuqingSong
Copy link
Collaborator

@JiuqingSong JiuqingSong commented Feb 21, 2025

When current paragraph has BR and do any paragraph format such as set indentation or bullet list, we need to split the paragraph by BR into multiple paragraphs then only format selected paragraphs.

For example:

<div>aaaa</div>
bbb<br>ccc<br>ddd<br>eee
<div>ffff</div>
<div>gggg</div>
hhh<br>iii<br>jjj
<div>kkk</div><!--{"type":"range","start":[3,2],"end":[13,1],"isReverted":false,"isDarkMode":false}-->

Before:
before

After:
after

Original bug: https://outlookweb.visualstudio.com/Outlook%20Web/_queries/edit/335899/?triage=true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

packages/roosterjs-content-model-api/lib/modelApi/block/splitSelectedParagraphByBr.ts:64

  • [nitpick] The function name 'shallowColonParagraph' is not immediately descriptive; consider renaming it to something like 'cloneParagraph' or 'createParagraphCopy' to better convey its purpose.
function shallowColonParagraph(para: ReadonlyContentModelParagraph): ShallowMutableContentModelParagraph {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant