Skip to content

Commit

Permalink
fix demo site
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaroldi committed Apr 1, 2024
1 parent c712f3b commit 7489c6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ export class AutoFormatCode extends CodeElement {
}

getCode() {
return `new roosterjs.AutoFormatPlugin('${this.options}')`;
return `new roosterjs.AutoFormatPlugin({
autoBullet: ${this.options.autoBullet},
autoLink: ${this.options.autoLink},
autoNumbering: ${this.options.autoNumbering},
autoUnlink: ${this.options.autoUnlink},
})`;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function getListTypeStyle(
listMarkerSegment &&
listMarkerSegment.segmentType == 'Text'
) {
const listMarker = listMarkerSegment.text;
const listMarker = listMarkerSegment.text.trim();
const bulletType = bulletListType[listMarker];

if (bulletType && shouldSearchForBullet) {
Expand Down Expand Up @@ -125,7 +125,7 @@ const bulletListType: Record<string, number> = {
};

const isNewList = (listMarker: string) => {
const marker = listMarker.replace(/[^\w\s]/g, '').trim();
const marker = listMarker.replace(/[^\w\s]/g, '');
const pattern = /^[1aAiI]$/;
return pattern.test(marker);
};

0 comments on commit 7489c6d

Please sign in to comment.