summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2010-09-08 13:49:59 +0000
committerRobin Appelman <icewind1991@gmail.com>2010-09-08 13:49:59 +0000
commit8ce564ccfe470c3215547893db488ed6d948d867 (patch)
tree9ed179f99c3138050f327761d9a364c966748623 /plugins
parent420178bec8d7716ee855af07b7a95fea972ac05c (diff)
downloadnextcloud-server-8ce564ccfe470c3215547893db488ed6d948d867.tar.gz
nextcloud-server-8ce564ccfe470c3215547893db488ed6d948d867.zip
keep indention when viewing text files
Diffstat (limited to 'plugins')
-rw-r--r--plugins/textviewer/textviewer.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/textviewer/textviewer.js b/plugins/textviewer/textviewer.js
index fd6b48f8896..788396d3d70 100644
--- a/plugins/textviewer/textviewer.js
+++ b/plugins/textviewer/textviewer.js
@@ -27,6 +27,8 @@ OC_TextViewer.hideText=function(){
OC_TextViewer.prepareText=function(text){
text=text.replace(/\n/g,"<br/>\n");
+ text=text.replace(/ /g,"&nbsp;");
+ text=text.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;");
return text;
}