From 9b3628b5ae472488e0a884fd4cf0ed5ee03254a9 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 4 May 2013 20:00:41 +0200 Subject: [PATCH] Preserve whitespaces in code tags. Fix #1079 --- CHANGELOG.md | 2 ++ src/Miscellaneous/Fourchan.coffee | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9728be6c..cc20108dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +- Fix whitespaces not being preserved in code tags in /g/. + ## 3.3.0 - *2013-05-02* - **New feature**: `Quick Reply Personas` diff --git a/src/Miscellaneous/Fourchan.coffee b/src/Miscellaneous/Fourchan.coffee index edb2fd36b..4e1073d72 100644 --- a/src/Miscellaneous/Fourchan.coffee +++ b/src/Miscellaneous/Fourchan.coffee @@ -7,7 +7,7 @@ Fourchan = $.globalEval """ window.addEventListener('prettyprint', function(e) { var pre = e.detail; - pre.innerHTML = prettyPrintOne(pre.innerHTML); + pre.innerHTML = prettyPrintOne(pre.innerHTML.replace(/\\s/g, ' ')); }, false); """ Post::callbacks.push