mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix(nbsp): nbsp are replaced with simple spaces
This commit is contained in:
parent
10b3410934
commit
6e90f7c5ad
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js.map
vendored
BIN
dist/showdown.min.js.map
vendored
Binary file not shown.
|
@ -268,6 +268,9 @@ showdown.Converter = function (converterOptions) {
|
||||||
text = text.replace(/\r\n/g, '\n'); // DOS to Unix
|
text = text.replace(/\r\n/g, '\n'); // DOS to Unix
|
||||||
text = text.replace(/\r/g, '\n'); // Mac to Unix
|
text = text.replace(/\r/g, '\n'); // Mac to Unix
|
||||||
|
|
||||||
|
// Stardardize line spaces (nbsp causes trouble in older browsers and some regex flavors)
|
||||||
|
text = text.replace(/\u00A0/g, ' ');
|
||||||
|
|
||||||
if (options.smartIndentationFix) {
|
if (options.smartIndentationFix) {
|
||||||
text = rTrimInputText(text);
|
text = rTrimInputText(text);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user