Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Mar 14, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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

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

No branches or pull requests

1 participant