-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
I want to parse according to CommonMark specification #287
Comments
Currently there is no explicit setting to adhere to CommonMark spec, will have a look at it. |
with regards to your example |
Because the language I use is Chinese, which belongs to the Unicode category,so CommonMark requires that emphasis be preceded by a whitespace character.
C# code: public void HtmlToMarkdown()
{
var html = "<p><strong>4月19日,特斯拉中国方面发布消息称,</strong>在上海市各级政府部署协调下,4月17日和4月18日,特斯拉8000名员工陆续返厂。其中,工厂电池、电机车间于4月19日早晨恢复生产。“特斯拉会在接下来的3、4天内进行产能逐步爬坡,到整体单班满产。”特斯拉超级工厂生产制造高级总监宋钢表示。</p>";
var config = new ReverseMarkdown.Config
{
UnknownTags = ReverseMarkdown.Config.UnknownTagsOption.PassThrough,
GithubFlavored = true,
DefaultCodeBlockLanguage = ""
};
var converter = new ReverseMarkdown.Converter(config);
var markdown = converter.Convert(html);
Console.WriteLine(markdown);
} output: **4月19日,特斯拉中国方面发布消息称,**在上海市各级政府部署协调下,4月17日和4月18日,特斯拉8000名员工陆续返厂。其中,工厂电池、电机车间于4月19日早晨恢复生产。“特斯拉会在接下来的3、4天内进行产能逐步爬坡,到整体单班满产。”特斯拉超级工厂生产制造高级总监宋钢表示。 |
This is going to be a huge set of changes to deal with, will look at how best to address it. |
Because my server side is parsed strictly according to CommonMark specification, so I hope Html parsing to Markdown has the option of parsing according to CommonMark specification.
output:
expected output:
The text was updated successfully, but these errors were encountered: