1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-31 17:08:22 +01:00

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: <https://github.com/facebook/phabricator/issues/487>

Reviewed by: epriestley
This commit is contained in:
Sergey Sharybin 2014-01-17 17:05:14 +06:00 committed by epriestley
parent 01a80af976
commit 035c79e7c0

View file

@ -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(