Skip to content

Commit 88dd6db

Browse files
committed
chore(info): add line breaks to TextParagraphGroup; remove console dump
1 parent cf66036 commit 88dd6db

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/helper/xml-slide-helper.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
import { XmlHelper } from './xml-helper';
1010
import HasShapes from '../classes/has-shapes';
1111
import { TableInfo } from '../types/table-types';
12+
import { vd } from './general-helper';
1213

1314
export const nsMain =
1415
'http://schemas.openxmlformats.org/presentationml/2006/main';
@@ -210,6 +211,12 @@ export class XmlSlideHelper {
210211
for (const textElement of Array.from(textElements)) {
211212
texts.push(textElement.textContent || '');
212213
}
214+
215+
// Check if the next sibling after rPr is a line break
216+
const nextSibling = run.nextSibling;
217+
if (nextSibling && nextSibling.nodeName === 'a:br') {
218+
texts.push(`\n`)
219+
}
213220
}
214221

215222
// Only add paragraphs that have text content
@@ -283,6 +290,7 @@ export class XmlSlideHelper {
283290
'numberingType',
284291
'bullet',
285292
'startAt',
293+
'breaks',
286294
] as const;
287295

288296
for (const key of propertyKeys) {

src/helper/xml-template-helper.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ export class XmlTemplateHelper {
4343
// Should be either:
4444
// a.) remove unused slides on generation
4545
// b.) use slides list from 'p:sldIdLst' in `ppt/presentation.xml`
46-
vd(this.relType)
47-
vd(this.path)
4846

4947
const creationIds: SlideInfo[] = [];
5048
for (const slideRel of relationships) {

0 commit comments

Comments
 (0)