diff options
author | James Moger <james.moger@gitblit.com> | 2015-05-22 13:39:17 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2015-05-22 13:39:17 -0400 |
commit | 310a807f07ceeaa7d8fa0890d9061021707bbeb8 (patch) | |
tree | a8c375dc296fc857338034898cf3a14f7b7beafc /src/main/java/com/gitblit/wicket/pages/BlobPage.java | |
parent | 99450c557d895c94e7eec618218d0f4bc5c16ffd (diff) | |
download | gitblit-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.java | 3 |
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>");
|