Skip to content

Commit

Permalink
fix: #1929 #1924
Browse files Browse the repository at this point in the history
  • Loading branch information
Jocs committed Aug 5, 2024
1 parent 50735d3 commit 2ce4dea
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import type { ColumnSeparatorType, ISectionColumnProperties, LocaleService, Nullable } from '@univerjs/core';
import { PRESET_LIST_TYPE, SectionType } from '@univerjs/core';
import { DataStreamTreeTokenType, PRESET_LIST_TYPE, SectionType } from '@univerjs/core';
import type {
IDocumentSkeletonCached,
IDocumentSkeletonGlyph,
Expand Down Expand Up @@ -761,6 +761,16 @@ export class DocumentSkeleton extends Skeleton {
const { x: startX } = this._findLiquid;

for (const glyph of glyphGroup) {
const gi = glyphGroup.indexOf(glyph);
const nextGlyph = glyphGroup[gi + 1];
// Should not select the last paragraph break.
if (
glyph.streamType === DataStreamTreeTokenType.PARAGRAPH &&
nextGlyph?.streamType === DataStreamTreeTokenType.SECTION_BREAK
) {
continue;
}

if (!glyph.content || glyph.content.length === 0) {
continue;
}
Expand Down

0 comments on commit 2ce4dea

Please sign in to comment.