add an extension to handle Chinese (or CJK) newlines. #334
Conversation
Sorry for the delay to get back to you. First, please rewrite the test to not need the testdata file. I see no reason for that. Also, move the test to Also, how does this work with consecutive newline characters (and how should it)? I see from the test that it doesn't join all the input into a single line, but can't immediately see why. |
1. delete testdata 'zhJoinLines.txt'. 2. move the testcase from markdown_test.go into block_test.go.
Thanks for your suggestion and I did the modifications. About the newline, there are actually two paragraphes in the testdata, one is:
and the other is:
So it should generate two lines:
and
Consecutive newline characters, for example two newlines, are used to separate two paragraphes and should not generate just one line (i.e. one paragraph). If I don't get your idea, please forgive me. Or you can give me an example to illustrate. |
Thanks, @choueric! |
See russross/blackfriday#334 "add an extension to handle Chinese (or CJK) newlines" for more information.
There is a common discussion, for example here, about the difference between English and Chinese when there are linebreaks in a paragraph. Here is a method by adding a extension to join lines.