Fix markup detection DocumentWriter.
This commit is contained in:
		@@ -100,9 +100,11 @@ namespace Tests.Formatter
 | 
				
			|||||||
        [Test]
 | 
					        [Test]
 | 
				
			||||||
        public void TextMarkup()
 | 
					        public void TextMarkup()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            _docWriter.Document = new Document();
 | 
					            DocumentWriter output = new DocumentWriter();
 | 
				
			||||||
            _docWriter.WriteLine("This is not bold. <b>This is bold!</b>");
 | 
					            _docWriter.Parent = output;
 | 
				
			||||||
 | 
					            _docWriter.Write("This is not bold. <b>This is bold!</b>\rThis not.");
 | 
				
			||||||
            _docWriter.Flush();
 | 
					            _docWriter.Flush();
 | 
				
			||||||
 | 
					            Assert.AreEqual("This is not bold. This is bold!\rThis not.", output.Text);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -227,7 +227,7 @@ namespace zaaReloaded2.Formatter
 | 
				
			|||||||
        StringBuilder _buffer;
 | 
					        StringBuilder _buffer;
 | 
				
			||||||
        // Put pattern in parentheses so they will not be discarded by Regex.Split
 | 
					        // Put pattern in parentheses so they will not be discarded by Regex.Split
 | 
				
			||||||
        // The splitting pattern must not contain subgroups!
 | 
					        // 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(@"<style:(?<style>[^>]+)>");
 | 
					        static readonly Regex _styleRegex = new Regex(@"<style:(?<style>[^>]+)>");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user