forked from commonmark/cmark
-
Notifications
You must be signed in to change notification settings - Fork 197
Closed
Description
Description
Generally I can emphasize a quoted term in English like as:
$ echo 'before *"phrase"* after' | build/src/cmark-gfm
<p>before <em>"phrase"</em> after</p>
On the other hand, its translated version in Japanese is not emphasized same to above:
$ echo '前*「フレーズ」*後' | build/src/cmark-gfm
<p>前*「フレーズ」*後</p>
(Note:
前meansbefore「(`\u300c*) is an open quoteフレーズmeansphrase」(`\u300d*) is a close quote後meansafter
)
Both English version and Japanese version examples should be parsed in the same way.
Steps to reproduce
- Clone the repository:
git clone https://github.com/github/cmark.git - CD to the repository:
cd cmark - Build the command line tool:
make - Try to parse a emphasis for quoted term
echo '前*「フレーズ」*後' | build/src/cmark-gfm
Expected result
<p>前<em>「フレーズ」</em>後</p>
Actual result
<p>前*「フレーズ」*後</p>
Details
It seems to be parsed based on the rule described at https://github.com/github/cmark/blob/master/test/spec.txt#L6346 :
This is not emphasis, because the opening `*` is preceded
by an alphanumeric and followed by punctuation, and hence
not part of a [left-flanking delimiter run]:
```````````````````````````````` example
a*"foo"*
.
<p>a*"foo"*</p>
However, in Japanese (and some other languages), terms are not separated with white spaces and emphasized quoted terms are generally written like as the example above.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels