Skip to content

Commit

Permalink
fix(nbsp): nbsp are replaced with simple spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
tivie committed Dec 17, 2016
1 parent 10b3410 commit 6e90f7c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions dist/showdown.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/showdown.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/showdown.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/showdown.min.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/converter.js
Expand Up @@ -268,6 +268,9 @@ showdown.Converter = function (converterOptions) {
text = text.replace(/\r\n/g, '\n'); // DOS 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) {
text = rTrimInputText(text);
}
Expand Down

1 comment on commit 6e90f7c

@tivie
Copy link
Member Author

@tivie tivie commented on 6e90f7c Dec 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

related to #312

Please sign in to comment.