Skip to content

Commit

Permalink
fix(pdf): validate empty line in line break setter
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Jan 31, 2022
1 parent 604b2e3 commit bc1116b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/better-write-app/src/store/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ export const useEditorStore = defineStore('editor', {
theme: useDefines().themes()[1],
draggable: false,
auto: 15,
bars: false,
bars: true,
entity: {
updateTime: true,
updateTime: false,
},
commands: {
prefix: '/',
Expand Down
5 changes: 4 additions & 1 deletion packages/better-write-plugin-pdf/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,10 @@ export const PluginPDFSet = (
page.entities.forEach((entity: Entity) => {
let _raw = {}

if (entity.raw === hooks.env.emptyLine()) {
if (
entity.raw === hooks.env.emptyLine() &&
entity.type === 'paragraph'
) {
_raw = lineBreak(false)
arr.push(_raw)
return
Expand Down

0 comments on commit bc1116b

Please sign in to comment.