mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2025-12-14 20:15:51 +00:00
make last new line optional, closes #1258
This commit is contained in:
@@ -112,7 +112,9 @@ export function parseClipboard (clipboard: string): Result<ParsedItem, string> {
|
||||
|
||||
function itemTextToSections (text: string) {
|
||||
const lines = text.split(/\r?\n/)
|
||||
lines.pop()
|
||||
if (lines[lines.length - 1] === '') {
|
||||
lines.pop()
|
||||
}
|
||||
|
||||
const sections: string[][] = [[]]
|
||||
lines.reduce((section, line) => {
|
||||
|
||||
Reference in New Issue
Block a user