From 035c79e7c077aaacff80db9444fb18eb52969862 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 Jan 2014 17:05:14 +0600 Subject: [PATCH] Fix tab indentation missing in Diffusion This seems to be a specific of how browsers are dealing with spaces/tabs. Multiple spaces works just fine, but multiple tabs were treating as a single space which breaks indentation. Now made it so tabs are replaced with 4 spaces. Not ideal but still better than fully unreadable code. This also matches to how differential is handling tabs. Ref T2495. See: Reviewed by: epriestley --- .../diffusion/controller/DiffusionBrowseFileController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/diffusion/controller/DiffusionBrowseFileController.php b/src/applications/diffusion/controller/DiffusionBrowseFileController.php index c996b7602a..6a14f5ac53 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseFileController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseFileController.php @@ -774,7 +774,7 @@ final class DiffusionBrowseFileController extends DiffusionBrowseController { "\xE2\x80\x8B", // TODO: [HTML] Not ideal. - phutil_safe_html($line['data']), + phutil_safe_html(str_replace("\t", ' ', $line['data'])), )); $rows[] = phutil_tag(