Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Removed replacing nbsp by spaces in lexer - FIXES markedjs#363
Browse files Browse the repository at this point in the history
  • Loading branch information
ArTiSTiX committed Oct 9, 2017
1 parent 8f9d0b7 commit 7dbc64d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ Lexer.prototype.lex = function(src) {
src = src
.replace(/\r\n|\r/g, '\n')
.replace(/\t/g, ' ')
.replace(/\u00a0/g, ' ')
.replace(/\u2424/g, '\n');

return this.token(src, true);
Expand Down Expand Up @@ -1094,7 +1093,7 @@ function escape(html, encode) {
}

function unescape(html) {
// explicitly match decimal, hex, and named HTML entities
// explicitly match decimal, hex, and named HTML entities
return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) {
n = n.toLowerCase();
if (n === 'colon') return ':';
Expand Down

0 comments on commit 7dbc64d

Please sign in to comment.