CJK-friendly emphasis

edit

Chinese, Japanese and Korean do not put spaces between words, so the rules of CommonMark, which look at the characters around the delimiters, often leave ** as text. CjkFriendlyEmphasis implements the CJK-friendly amendment of these rules: a Chinese, Japanese or Korean character next to the delimiters counts as whitespace, so the delimiters can open or close.

// CommonMark does not close the emphasis: the punctuation before ** is followed by a letter
Assert.Equal("<p>**テスト。**です</p>\n", MarkdownHtmlRenderer.ToHtml(MarkdownSyntaxTree.ParseText("**テスト。**です\n")));

var options = new MarkdownParseOptions { Extensions = MarkdownExtensions.CjkFriendlyEmphasis };
Assert.Equal("<p><strong>テスト。</strong>です</p>\n", MarkdownHtmlRenderer.ToHtml(MarkdownSyntaxTree.ParseText("**テスト。**です\n", options)));

CommonMark does not close **テスト。**です, as the punctuation before the delimiters is followed by a letter. The extension does.