From 50bb21b3432911fdeee5a141e0241cbf3f4b87ba Mon Sep 17 00:00:00 2001 From: Timo Paulssen Date: Wed, 8 Jul 2009 13:59:21 +0200 Subject: [PATCH] now you can paste audio and image files from gnome apps, too. --- ankiqt/ui/facteditor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index d6753bc13..54e193979 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -947,6 +947,9 @@ class FactEdit(QTextEdit): if "\n" in txt: txt = txt.split("\n")[0] hadN = True + if "\r" in txt: + txt = txt.split("\r")[0] + hadN = True if not source.hasImage() or hadN: # firefox on linux just gives us a url ext = txt.split(".")[-1].lower()