summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/pages/BlobPage.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2015-05-22 13:39:17 -0400
committerJames Moger <james.moger@gitblit.com>2015-05-22 13:39:17 -0400
commit310a807f07ceeaa7d8fa0890d9061021707bbeb8 (patch)
treea8c375dc296fc857338034898cf3a14f7b7beafc /src/main/java/com/gitblit/wicket/pages/BlobPage.java
parent99450c557d895c94e7eec618218d0f4bc5c16ffd (diff)
downloadgitblit-310a807f07ceeaa7d8fa0890d9061021707bbeb8.tar.gz
gitblit-310a807f07ceeaa7d8fa0890d9061021707bbeb8.zip
Implement configurable tab length support for blob views
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages/BlobPage.java')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BlobPage.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/BlobPage.java b/src/main/java/com/gitblit/wicket/pages/BlobPage.java
index df30e4cc..1ef8f227 100644
--- a/src/main/java/com/gitblit/wicket/pages/BlobPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/BlobPage.java
@@ -195,7 +195,8 @@ public class BlobPage extends RepositoryPage {
} else {
sb.append("<pre class=\"plainprint\">");
}
- lines = StringUtils.escapeForHtml(source, true).split("\n");
+ final int tabLength = app().settings().getInteger(Keys.web.tabLength, 4);
+ lines = StringUtils.escapeForHtml(source, true, tabLength).split("\n");
sb.append("<table width=\"100%\"><tbody>");