You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:10:40 UTC

[sling-org-apache-sling-scripting-sightly-compiler] 20/31: SLING-6471 - [HTL] data-sly-repeat should add a new line after every appended element in the output

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 59dc3e066cc0a022e249bc6007e330b009035750
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Tue Jan 17 08:39:39 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@1779151 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/scripting/sightly/impl/plugin/RepeatPlugin.java    | 6 ++++++
 1 file changed, 6 insertions(+)

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 dfd59ed..519d2e9 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
@@ -20,6 +20,7 @@ package org.apache.sling.scripting.sightly.impl.plugin;
 
 import java.util.HashMap;
 
+import org.apache.sling.scripting.sightly.compiler.commands.OutText;
 import org.apache.sling.scripting.sightly.impl.compiler.Syntax;
 import org.apache.sling.scripting.sightly.compiler.expression.Expression;
 import org.apache.sling.scripting.sightly.compiler.expression.ExpressionNode;
@@ -73,6 +74,11 @@ public class RepeatPlugin extends AbstractPlugin {
             }
 
             @Override
+            public void afterTagClose(PushStream stream, boolean isSelfClosing) {
+                stream.write(new OutText("\n"));
+            }
+
+            @Override
             public void afterElement(PushStream stream) {
                 stream.write(VariableBinding.END);
                 stream.write(Loop.END);

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