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

If not merging Paragraphs, keep the source format #1952

Merged
merged 5 commits into from
Jul 14, 2023

Conversation

BryanValverdeU
Copy link
Contributor

If we merge some content with Table and a paragraph. The block format of the table (All the borders,etc) is leaking to the paragraphs that are after the table.

So, if we are not merging To Current Paragraph, keep using the format of the source block.

See gifs attached here for the before and after:
https://outlookweb.visualstudio.com/Outlook%20Web/_workitems/edit/215985/

@BryanValverdeU BryanValverdeU changed the title If we are not merging Paragraphs, keep the source format If not merging Paragraphs, keep the source format Jul 14, 2023
@@ -132,6 +132,10 @@ function mergeParagraph(
if (newPara.decorator) {
newParagraph.decorator = { ...newPara.decorator };
}

if (!mergeToCurrentParagraph) {
newParagraph.format = newPara.format;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this format already applied in line 228?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh I got it, so this is to remove existing format from source block

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it seems that in some cases, when we split the paragraph, the previous paragraph's format is applied to the markerPosition's paragraph.
I think this might not be okay, because it is causing the subsecuent paragraphs to also get the format even if they do not have it.

@BryanValverdeU BryanValverdeU merged commit b4604ae into master Jul 14, 2023
@JiuqingSong JiuqingSong deleted the u/bvalverde/fixMergeWithTable branch September 8, 2023 22:35
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.

2 participants