diff --git a/dist/showdown.js b/dist/showdown.js
index 5d9f5a5..eddb12a 100644
Binary files a/dist/showdown.js and b/dist/showdown.js differ
diff --git a/dist/showdown.js.map b/dist/showdown.js.map
index 6789922..228a005 100644
Binary files a/dist/showdown.js.map and b/dist/showdown.js.map differ
diff --git a/dist/showdown.min.js b/dist/showdown.min.js
index 0f692f5..8a5fe7c 100644
Binary files a/dist/showdown.min.js and b/dist/showdown.min.js differ
diff --git a/dist/showdown.min.js.map b/dist/showdown.min.js.map
index a48f2a3..21a5190 100644
Binary files a/dist/showdown.min.js.map and b/dist/showdown.min.js.map differ
diff --git a/src/subParsers/lists.js b/src/subParsers/lists.js
index 6bd24b0..ee4f30b 100644
--- a/src/subParsers/lists.js
+++ b/src/subParsers/lists.js
@@ -93,12 +93,16 @@ showdown.subParser('lists', function (text, options, globals) {
item = showdown.subParser('lists')(item, options, globals);
item = item.replace(/\n$/, ''); // chomp(item)
item = showdown.subParser('hashHTMLBlocks')(item, options, globals);
+ // Colapse double linebreaks
item = item.replace(/\n\n+/g, '\n\n');
+ // replace double linebreaks with a placeholder
+ item = item.replace(/\n\n/g, '~B');
if (isParagraphed) {
item = showdown.subParser('paragraphs')(item, options, globals);
} else {
item = showdown.subParser('spanGamut')(item, options, globals);
}
+ item = item.replace(/~B/g, '\n\n');
}
// now we need to remove the marker (~A)
diff --git a/src/subParsers/spanGamut.js b/src/subParsers/spanGamut.js
index bb0f194..3f02547 100644
--- a/src/subParsers/spanGamut.js
+++ b/src/subParsers/spanGamut.js
@@ -26,10 +26,10 @@ showdown.subParser('spanGamut', function (text, options, globals) {
// Do hard breaks
if (options.simpleLineBreaks) {
// GFM style hard breaks
- text = text.replace(/\b\n\b/g, '
\n');
+ text = text.replace(/\n/g, '
\n');
} else {
// Vanilla hard breaks
- text = text.replace(/\b +\n\b/g, '
\n');
+ text = text.replace(/ +\n/g, '
\n');
}
text = globals.converter._dispatch('spanGamut.after', text, options, globals);
diff --git a/test/features/#318.simpleLineBreaks-does-not-work-with-chinese-characters.html b/test/features/#318.simpleLineBreaks-does-not-work-with-chinese-characters.html
new file mode 100644
index 0000000..0776072
--- /dev/null
+++ b/test/features/#318.simpleLineBreaks-does-not-work-with-chinese-characters.html
@@ -0,0 +1,4 @@
+
foo烫
+bar
foo
+bar
Nom : aaaa
+Nom : aaa
One
Two
+ foo
bar
+ bazinga
nhecos
Three
+foo
bar