From 44dea8211e4344e3f74c9d86161ce0fa3cc7c167 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 29 Feb 2012 12:51:00 +0900 Subject: [PATCH] don't strip leading whitespace --- anki/importing/csvfile.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/anki/importing/csvfile.py b/anki/importing/csvfile.py index 6a5c5fafb..2c0018621 100644 --- a/anki/importing/csvfile.py +++ b/anki/importing/csvfile.py @@ -70,11 +70,8 @@ class TextImporter(NoteImporter): self.data = self.fileobj.read() if self.data.startswith(codecs.BOM_UTF8): self.data = self.data[len(codecs.BOM_UTF8):] - print "fixme: don't strip leading whitespace" def sub(s): - return re.sub( - "^\#.*", "", re.sub( - "^ +", "", s)) + return re.sub("^\#.*", "", s) self.data = [sub(x) for x in self.data.split("\n") if sub(x)] if self.data: if self.data[0].startswith("tags:"):