jalaluddin / markdownsharp

Automatically exported from code.google.com/p/markdownsharp
0 stars 0 forks source link

AutoNewlines set through MarkdownOptions replaces EOL with <br instead of <br /> #67

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

If you set up markdown and then pass an option, things work swimmingly. But if 
you pass in markdownoptions, not so much. I've inspected the code and nothing 
jumps out at me on what might be wrong.

     [Test]
        public void TestAutoNewlinesVersusMarkdownOptions()
        {
            var markdown = new Markdown();
            markdown.AutoNewLines = true;
            var markdownWithOptions = new Markdown(new MarkdownOptions
                {
                    AutoNewlines = true,
                });

            Assert.AreEqual("<p>Markdown with options set separately<br />\nworks without issue<br />\nso this is good.</p>\n",
               markdown.Transform(@"Markdown with options set separately
works without issue
so this is good."));
            Assert.AreEqual("<p>Markdown set with MarkdownOptions<br />\nhas issues<br />\nbut it should not.</p>\n",
                markdownWithOptions.Transform(@"Markdown set with MarkdownOptions
has issues
but it should not."));

What is the expected output? What do you see instead?
Instead of "<br />", it replaces with "<br "

What version of the product are you using? On what operating system?

Anything SINCE the last release on nuget.

Original issue reported on code.google.com by trueblu...@gmail.com on 1 Jan 2015 at 2:03