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

Set default value " />" for MarkdownOptions.EmptyElementSuffix. #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kobake
Copy link

@kobake kobake commented Jun 16, 2020

Problem

I met the problem like #9 when I wrote the code as follows.

var markdown = new Markdown(new MarkdownOptions { AutoNewlines = true });
var html = markdown.Transform("AB\nCD"); // Result: "<p>AB<br\nCD</p>" (Unexpected)

"\n" was converted to "<br\n". It's not expected for me and everyone, I think.

We can fix this code like var markdown = new Markdown(new MarkdownOptions { AutoNewlines = true, EmptyElementSuffix = " />" });, but it's more useful if the default value of MarkdownOptions .EmptyElementSuffix was set.

Solution

This PR sets default value " />" for MarkdownOptions.EmptyElementSuffix.
It's the same default value as Markdown.EmptyElementSuffix.

This " />" is the same value as Markdown.EmptyElementSuffix.
@kobake
Copy link
Author

kobake commented Jun 16, 2020

https://ci.appveyor.com/project/StackExchange/markdownsharp/builds/33547200/job/dcqr2n2ujsxdmd4s

An error seemed to occur in AppVayor Ubuntu phase. Can we ignore that?

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

Successfully merging this pull request may close these issues.

1 participant