Skip to content

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

Description

@GoogleCodeExporter
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions