Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable31] fix/6871 smart add to next line #6916

Merged
merged 3 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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()
}

Check warning on line 165 in src/plugins/currentLineMenu.js

View check run for this annotation

Codecov / codecov/patch

src/plugins/currentLineMenu.js#L160-L165

Added lines #L160 - L165 were not covered by tests
})
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
Loading