From 6e90f7c5ad881d73706b13a56c1aace48dd3c718 Mon Sep 17 00:00:00 2001 From: Estevao Soares dos Santos Date: Sat, 17 Dec 2016 05:26:15 +0000 Subject: [PATCH] fix(nbsp): nbsp are replaced with simple spaces --- dist/showdown.js | Bin 72259 -> 72395 bytes dist/showdown.js.map | Bin 213095 -> 213487 bytes dist/showdown.min.js | Bin 29307 -> 29334 bytes dist/showdown.min.js.map | Bin 32563 -> 32594 bytes src/converter.js | 3 +++ 5 files changed, 3 insertions(+) diff --git a/dist/showdown.js b/dist/showdown.js index 4638e20953decb0de2d03250cb84dd761dc4a85c..61b604df1beb05c45eba8003c3464aa8f6c42ae6 100644 GIT binary patch delta 124 zcmX@Sh2`{CmJR*!k^1@y!6k`BDL|B2m8y`FnU|_iT#%TYTCAXvmsDJ!kepar4CIs) z<(DSqq$*_QDdgv*q!uY873G%~rxq0}B<7_k6zAurDio!rr&cJW;eEb)(18K diff --git a/dist/showdown.js.map b/dist/showdown.js.map index f6edb2177f672154ea3f3a31ae4bd8d9222b545b..dacc764c41fba60b4a0674a5a2e17012cd821f8f 100644 GIT binary patch delta 274 zcmaFf!27 TbR7kC1$9m9?FVa_mK_2BU)^Rc delta 52 zcmV-40L%aHgAM0^4X{JGlQ8uKm!PKs3bRhSb{Ye8T1J`sq4K3Y(KOB)tGK*9}+z delta 14 VcmbRCl=1fy#to?&n;SI5yZ|>z22}t6 diff --git a/dist/showdown.min.js.map b/dist/showdown.min.js.map index 928dc3f0ff6cac38175f866381b557d43b4cb1a7..2c7f5c4e50d13433ebcaf856bc35a1feb126bf5f 100644 GIT binary patch delta 40 wcmdn|kMYt!#tq*L*-c#Bbo?EQCjT|8o@`|#!5Ql47_Q^(=xV&V%4nw#09#8BYybcN delta 40 wcmccgk8$%q#tq*Lxhh@Ubo?E2TpTkef3y~vY!JXYS<)z;$+c|rOrxDX0AQ;R<^TWy diff --git a/src/converter.js b/src/converter.js index bacf033..9760b62 100644 --- a/src/converter.js +++ b/src/converter.js @@ -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); }