diff options
Diffstat (limited to 'ui/frontmatter_editor.py')
| -rw-r--r-- | ui/frontmatter_editor.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/frontmatter_editor.py b/ui/frontmatter_editor.py index 6c53ac3..160536e 100644 --- a/ui/frontmatter_editor.py +++ b/ui/frontmatter_editor.py @@ -82,6 +82,9 @@ class FrontmatterEditor(QDialog): widget = QLineEdit(", ".join(str(v) for v in val) if isinstance(val, list) else str(val)) MultiTokenCompleter(known_tags, widget).attach(widget) self._fields[key] = widget + elif isinstance(val, list): + widget = QLineEdit(", ".join(str(v) for v in val)) + self._fields[key] = widget else: widget = QLineEdit(str(val)) self._fields[key] = widget @@ -104,7 +107,7 @@ class FrontmatterEditor(QDialog): updated[key] = widget.currentText() elif isinstance(widget, QLineEdit): val = widget.text().strip() - if key == "tags": + if isinstance(self._article.frontmatter.get(key), list): updated[key] = [t.strip() for t in val.split(",") if t.strip()] else: updated[key] = val |
