sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-scripting-sightly-compiler] 21/31: SLING-6471 - [HTL] data-sly-repeat should add a new line after every appended element in the output
Date Tue, 07 Nov 2017 10:10:41 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.scripting.sightly.compiler-1.0.10
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-compiler.git

commit 4767e51a212d9ef6918a875cb8160028a88d00d5
Author: Radu Cotescu <radu@apache.org>
AuthorDate: Tue Jan 17 14:31:45 2017 +0000

    SLING-6471 - [HTL] data-sly-repeat should add a new line after every appended element
in the output
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1779199
13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/scripting/sightly/impl/plugin/RepeatPlugin.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/RepeatPlugin.java
b/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/RepeatPlugin.java
index 519d2e9..e8ca678 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/RepeatPlugin.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/RepeatPlugin.java
@@ -46,6 +46,7 @@ public class RepeatPlugin extends AbstractPlugin {
     private static final String LAST = "last";
     private static final String ODD = "odd";
     private static final String EVEN = "even";
+    private static final OutText NEW_LINE = new OutText("\n");
 
     public RepeatPlugin() {
         name = "repeat";
@@ -75,7 +76,7 @@ public class RepeatPlugin extends AbstractPlugin {
 
             @Override
             public void afterTagClose(PushStream stream, boolean isSelfClosing) {
-                stream.write(new OutText("\n"));
+                stream.write(NEW_LINE);
             }
 
             @Override

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Mime
View raw message