From 880e8b0bdcd716f3db645cddf3c3511bb79f9a55 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Wed, 5 Aug 2015 06:46:52 +0200 Subject: [PATCH] Fix importing of actual Word text. - FIX: Datenimport funktioniert jetzt auch mit Word-Text und nicht nur in den Tests. --- zaaReloaded2/Importer/ZaaImporter/ZaaImporter.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zaaReloaded2/Importer/ZaaImporter/ZaaImporter.cs b/zaaReloaded2/Importer/ZaaImporter/ZaaImporter.cs index 223aadf..aea8b8a 100755 --- a/zaaReloaded2/Importer/ZaaImporter/ZaaImporter.cs +++ b/zaaReloaded2/Importer/ZaaImporter/ZaaImporter.cs @@ -67,8 +67,11 @@ namespace zaaReloaded2.Importer.ZaaImporter /// ZAA-formatted Lauris output to import. public void Import(string text) { + // Split the text into parargraphs. This implementation relies on the fact + // that the order or splitting strings in C#'s String.Split() method is + // important; see http://stackoverflow.com/a/8664639/270712 string[] paragraphs = text.Split( - new string[] { Environment.NewLine }, + new string[] { "\r\n", "\n\r", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries); LaurisTimePoint timePoint = null;