Skip to content

Commit

Permalink
Merge pull request #6916 from nextcloud/backport/6915/stable31
Browse files Browse the repository at this point in the history
[stable31] fix/6871 smart add to next line
  • Loading branch information
max-nextcloud authored Feb 27, 2025
2 parents 795edc6 + c86e121 commit 22717e5
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 20 deletions.
45 changes: 32 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"raw-loader": "^4.0.2",
"rollup-plugin-webpack-stats": "^1.2.3",
"typescript": "^5.7.2",
"vite": "^5.4.11",
"vite": "^5.4.14",
"vite-plugin-commonjs": "^0.10.4",
"vitest": "^2.1.8",
"vue-demi": "^0.14.10",
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/currentLineMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ function menuForCurrentParagraph(editor) {
const { selection } = editor.state
const { textContent } = selection.$anchor.parent
const eol = selection.$anchor.end()
const contentToInsert = textContent.match(/(^| )$/) ? '/' : ' /'
editor.chain()
.focus()
.setTextSelection(eol)
.insertContent(contentToInsert)
.run()
const chain = editor.chain().focus().setTextSelection(eol)
if (textContent.trim() === '') {
chain.insertContent('/').run()
} else {
chain.splitBlock().insertContent('/').run()
}
})
return menu.$el
}
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ const config = createAppConfig({
}
},
},
server: {
allowedHosts: ['host.docker.internal', 'localhost', 'nextcloud.local'],
},
},
})

Expand Down

0 comments on commit 22717e5

Please sign in to comment.