diff --git a/Tests/Formatter/DocumentWriterTest.cs b/Tests/Formatter/DocumentWriterTest.cs
index 74d3075..bb74e46 100755
--- a/Tests/Formatter/DocumentWriterTest.cs
+++ b/Tests/Formatter/DocumentWriterTest.cs
@@ -100,9 +100,11 @@ namespace Tests.Formatter
[Test]
public void TextMarkup()
{
- _docWriter.Document = new Document();
- _docWriter.WriteLine("This is not bold. This is bold!");
+ DocumentWriter output = new DocumentWriter();
+ _docWriter.Parent = output;
+ _docWriter.Write("This is not bold. This is bold!\rThis not.");
_docWriter.Flush();
+ Assert.AreEqual("This is not bold. This is bold!\rThis not.", output.Text);
}
}
}
diff --git a/zaaReloaded2/Formatter/DocumentWriter.cs b/zaaReloaded2/Formatter/DocumentWriter.cs
index 1b9356b..ad1acfd 100755
--- a/zaaReloaded2/Formatter/DocumentWriter.cs
+++ b/zaaReloaded2/Formatter/DocumentWriter.cs
@@ -227,7 +227,7 @@ namespace zaaReloaded2.Formatter
StringBuilder _buffer;
// Put pattern in parentheses so they will not be discarded by Regex.Split
// The splitting pattern must not contain subgroups!
- static readonly Regex _markupRegex = new Regex(@"(<[^>]+>)");
+ static readonly Regex _markupRegex = new Regex(@"(<[^ >]+>)");
static readonly Regex _styleRegex = new Regex(@"[^>]+)>");