Skip to content

Commit e0d8bbe

Browse files
committed
Merge branch 'fix-312' of https://github.com/Hypertopic/HyperGlosae into fix-312
2 parents c1f78d0 + a99e492 commit e0d8bbe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

frontend/src/components/Metadata.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function Metadata({metadata = {}, editable, backend, setLastUpdate}) {
2626
...Object.fromEntries(
2727
Object.entries(editedDocument).filter(([key, _]) => !key.startsWith('dc_'))
2828
),
29-
...parse(event.target.value.replaceAll(/(dc_isPartOf|dc_title):\s*"?([^"\n]+)"?$/gm), '$1: "$2')
29+
...parse(event.target.value.replaceAll(/(dc_isPartOf|dc_title):\s*(?:"([^"\n]*?)"|([^"\n]+?))\s*$/gm, (_, key, quoted, unquoted) => `${key}: "${(quoted ?? unquoted).trim()}"`))
3030
};
3131
setEditedDocument(updatedDocument);
3232
backend.putDocument(updatedDocument)

0 commit comments

Comments
 (0)