Skip to content
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
[#883](https://github.com/nextcloud/cookbook/pull/883) @christianlupus
- Make the controls sticky on top
[#888](https://github.com/nextcloud/cookbook/pull/888) @MarcelRobitaille
- Cleanup code related to pasting
[#886](https://github.com/nextcloud/cookbook/pull/886) @MarcelRobitaille

### Documentation
- Added clarification between categories and keywords for users
Expand Down
11 changes: 4 additions & 7 deletions src/components/EditInputGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ export default {
// from the data pasted in the input field (e.target.value)
const clipboardData = e.clipboardData || window.clipboardData
const pastedData = clipboardData.getData("Text")
const inputLinesArray = pastedData.split(/\r\n|\r|\n/g)
const inputLinesArray = pastedData
.split(/\r\n|\r|\n/g)
// Remove empty lines
.filter((line) => line.trim() !== "")

if (inputLinesArray.length === 1) {
this.singleLinePasted = true
Expand All @@ -187,12 +190,6 @@ export default {
$li
)

// Remove empty lines
for (let i = inputLinesArray.length - 1; i >= 0; --i) {
if (inputLinesArray[i].trim() === "") {
inputLinesArray.splice(i, 1)
}
}
for (let i = 0; i < inputLinesArray.length; ++i) {
this.addNewEntry(
$insertedIndex + i + 1,
Expand Down