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:20 UTC
[sling-org-apache-sling-scripting-sightly-compiler] annotated tag
org.apache.sling.scripting.sightly.compiler-1.0.10 created (now 1584de2)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a change 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.
at 1584de2 (tag)
tagging fcaec058929c541b8496d33880636e591dfd0f53 (commit)
by Radu Cotescu
on Wed Aug 2 09:51:08 2017 +0000
- Log -----------------------------------------------------------------
org.apache.sling.scripting.sightly.compiler-1.0.10
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new c9403c9 SLING-5787 - Modularise the Sightly script engine
new f20634b trivial: added scm info + updated readme for sightly modules
new 584a210 svn:ignore
new 1154ba3 SLING-5314 - Support setting the basename for the resource bundle backing the Sightly i18n Extension
new cae1ea2 SLING-5825 - Add support for implicit conversion of Enum to String
new 2a9aea4 SLING-5944 - Sightly doesn't allow to overwrite the context for `data-sly-element`
new f86f2b2 SLING-6008 - The display context cannot be overwritten for HTML attribute expressions
new c912939 trivial: corrected Sightly lexer for escaped expressions
new 97c1c38 SLING-5978 - Make Sightly throw compilation errors when unknown data-sly-* plugins are used
new ac72027 SLING-6028 - Replace Sightly references with HTL in both code and documentation
new cf7ae64 SLING-6033 - Update Sightly bundles to parent pom 28
new 0116269 trivial: corrected JavaDoc
new 8b89d41 trivial: configured javadoc plugin
new 51894a3 [maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.0
new 6760e27 [maven-release-plugin] prepare for next development iteration
new 8848cb0 SLING-6125 - Switch HTL to OSGi R6 annotations
new 987b681 [maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.2
new 6f2af9f [maven-release-plugin] prepare for next development iteration
new e3b9963 SLING-6186 - Add support for checking code coverage with jacoco
new 867af05 SLING-6224 - Expand the accepted & ignored whitespace characters for HTL scripts
new 45b3ff9 SLING-6186 - Add support for checking code coverage with jacoco
new 19c228c SLING-6230 - The SightlyCompiler reports errors and warnings with an offset by one for the line count
new 3f0ea53 SLING-6399 - Implement support for date and number formatting for HTL
new ac93951 [maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.4
new d89d4ca [maven-release-plugin] prepare for next development iteration
new 9d4d81a reverted release
new 6b7fdbd SLING-6399 - Implement support for date and number formatting for HTL
new 2d7d016 [maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.4
new 3923157 [maven-release-plugin] prepare for next development iteration
new d4376d1 SLING-6445 - HTL scripts do not compile on Windows if the compiler needs to generate any warnings
new c0cc4ef SLING-6450 - [HTL] Cannot retrieve "length" property for arrays of primitive types
new 7c80220 [maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.6
new 20ab94d [maven-release-plugin] prepare for next development iteration
new 59dc3e0 SLING-6471 - [HTL] data-sly-repeat should add a new line after every appended element in the output
new 4767e51 SLING-6471 - [HTL] data-sly-repeat should add a new line after every appended element in the output
new 2329930 [maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.8
new 448f797 [maven-release-plugin] prepare for next development iteration
new 3d214bc trivial: clarified license for HTL compiler dependencies
new fc1c221 use Sling Parent 30
new 610873f Typo in comment
new 5c2cb21 SLING-6866 - HTL doesn't allow to overwrite the context for data-sly-text
new f29186c SLING-7024 - Sightly doesn't allow to emit style or on event attributes for data-sly-attribute
new b4fd053 releng: updated Provide-Capability bundle headers for HTL modules
new 626514c [maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.10
new fcaec05 [maven-release-plugin] copy for tag org.apache.sling.scripting.sightly.compiler-1.0.10
The 45 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].
[sling-org-apache-sling-scripting-sightly-compiler] 29/31: releng:
updated Provide-Capability bundle headers for HTL modules
Posted by ro...@apache.org.
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 b4fd053a02188691e7117a9430cbd89db9af3d4e
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Tue Aug 1 10:14:47 2017 +0000
releng: updated Provide-Capability bundle headers for HTL modules
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1803634 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index f8d1ab1..c933ab5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,7 +79,8 @@
io.sightly.compiler; version:Version=1.0,
io.sightly.compiler; version:Version=1.1,
io.sightly.compiler; version:Version=1.2,
- io.sightly.compiler; version:Version=1.3
+ io.sightly.compiler; version:Version=1.3,
+ io.sightly.compiler; version:Version=1.3.1
</Provide-Capability>
</instructions>
</configuration>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 10/31:
[maven-release-plugin] prepare release
org.apache.sling.scripting.sightly.compiler-1.0.4
Posted by ro...@apache.org.
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 ac93951a1f7bebded5c32d29f45d266a356c3843
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Thu Dec 15 13:28:41 2016 +0000
[maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.4
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1774437 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 5f4de20..2be65e9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.3-SNAPSHOT</version>
+ <version>1.0.4</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
@@ -44,9 +44,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</developerConnection>
- <url>http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.4</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.4</developerConnection>
+ <url>http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.4</url>
</scm>
<properties>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 05/31:
SLING-6186 - Add support for checking code coverage with jacoco
Posted by ro...@apache.org.
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 e3b99630215fc884500a636e7fda53c08f6bc824
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Tue Oct 25 15:19:19 2016 +0000
SLING-6186 - Add support for checking code coverage with jacoco
* configured jacoco for all HTL modules that provide unit tests
* IT code coverage can be obtained from the testing module
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1766545 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/pom.xml b/pom.xml
index 85135c6..6d18bcd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -146,6 +146,46 @@
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>coverage-report</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.7.201606060606</version>
+ <executions>
+ <execution>
+ <id>default-prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>org/apache/sling/scripting/sightly/**/*</include>
+ </includes>
+ <excludes>
+ <exclude>org/apache/sling/scripting/sightly/impl/parser/expr/generated/*</exclude>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
<!-- ======================================================================= -->
<!-- D E P E N D E N C I E S -->
<!-- ======================================================================= -->
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 16/31:
SLING-6445 - HTL scripts do not compile on Windows if the compiler needs to
generate any warnings
Posted by ro...@apache.org.
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 d4376d154029b9d18a2527a5d886e1163e1f224a
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Mon Jan 9 14:38:45 2017 +0000
SLING-6445 - HTL scripts do not compile on Windows if the compiler needs to generate any warnings
* applied patch from Vlad Băilescu
* improved launchpad readiness test
* updated HTL test dependencies
(Closes #196)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1777973 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 14 +++++++-
.../sightly/compiler/SightlyCompiler.java | 15 ++++++--
.../sightly/impl/compiler/SightlyCompilerTest.java | 41 ++++++++++++++++++++--
.../resources/missing-explicit-context-mac.html | 1 +
.../resources/missing-explicit-context-win.html | 19 ++++++++++
5 files changed, 84 insertions(+), 6 deletions(-)
diff --git a/pom.xml b/pom.xml
index 20dbf6b..6fd1459 100644
--- a/pom.xml
+++ b/pom.xml
@@ -234,7 +234,19 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-reflect</artifactId>
- <version>1.5.5</version>
+ <version>1.6.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ <version>1.6.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ <version>1.6.5</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java b/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java
index ed5ef36..a24c940 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java
@@ -166,8 +166,19 @@ public final class SightlyCompiler {
int offendingInputIndex = documentFragment.indexOf(offendingInput);
if (offendingInputIndex > -1) {
String textBeforeError = documentFragment.substring(0, offendingInputIndex);
- int line = lineOffset + textBeforeError.length() - textBeforeError.replaceAll(System.lineSeparator(), "").length();
- int column = textBeforeError.substring(textBeforeError.lastIndexOf(System.lineSeparator())).length();
+ int line = lineOffset;
+ int lastNewLineIndex = 0;
+ for (String s : new String[] {"\r\n", "\r", "\n"}) {
+ int l = textBeforeError.split(s, -1).length - 1;
+ if (l + lineOffset > line) {
+ line = l + lineOffset;
+ int ix = textBeforeError.lastIndexOf(s);
+ if (ix > 0) {
+ lastNewLineIndex = ix + s.length() - 1;
+ }
+ }
+ }
+ int column = textBeforeError.substring(lastNewLineIndex).length();
if (column != columnOffset) {
column +=columnOffset;
}
diff --git a/src/test/java/org/apache/sling/scripting/sightly/impl/compiler/SightlyCompilerTest.java b/src/test/java/org/apache/sling/scripting/sightly/impl/compiler/SightlyCompilerTest.java
index 4af5713..e861b5f 100644
--- a/src/test/java/org/apache/sling/scripting/sightly/impl/compiler/SightlyCompilerTest.java
+++ b/src/test/java/org/apache/sling/scripting/sightly/impl/compiler/SightlyCompilerTest.java
@@ -26,10 +26,16 @@ import org.apache.sling.scripting.sightly.compiler.CompilerMessage;
import org.apache.sling.scripting.sightly.compiler.SightlyCompiler;
import org.apache.sling.scripting.sightly.impl.TestUtils;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(SightlyCompiler.class)
public class SightlyCompilerTest {
private SightlyCompiler compiler = new SightlyCompiler();
@@ -42,18 +48,47 @@ public class SightlyCompilerTest {
@Test
public void testMissingExplicitContext() {
- String script = "/missing-explicit-context.html";
+ for (String s : new String[] {"", "-win", "-mac"}) {
+ String script = "/missing-explicit-context" + s + ".html";
+ testMissingExplicitContext(script);
+ }
+ }
+
+ private void testMissingExplicitContext(String script) {
CompilationResult result = compile(script);
List<CompilerMessage> warnings = result.getWarnings();
- assertTrue("Expected compilation warnings.", warnings.size() == 1);
+ assertTrue(script + ": Expected compilation warnings.", warnings.size() == 1);
CompilerMessage warningMessage = warnings.get(0);
- assertEquals("Expected warning on a different line.", 18, warningMessage.getLine());
+ assertEquals(script + ": Expected warning on a different line.", 18, warningMessage.getLine());
+ assertEquals(script + ": Expected warning on a different column.", 14, warningMessage.getColumn());
assertTrue(script.equals(warningMessage.getScriptName()));
assertEquals("${some.value}: Element script requires that all expressions have an explicit context specified. The expression will" +
" be replaced with an empty string.", warningMessage.getMessage());
}
@Test
+ public void testMissingExplicitContextOnWindows() {
+ PowerMockito.mockStatic(System.class);
+ PowerMockito.when(System.lineSeparator()).thenReturn("\r\n");
+
+ for (String s : new String[] {"", "-win", "-mac"}) {
+ String script = "/missing-explicit-context" + s + ".html";
+ testMissingExplicitContext(script);
+ }
+ }
+
+ @Test
+ public void testMissingExplicitContextOnMac() {
+ PowerMockito.mockStatic(System.class);
+ PowerMockito.when(System.lineSeparator()).thenReturn("\r");
+
+ for (String s : new String[] {"", "-win", "-mac"}) {
+ String script = "/missing-explicit-context" + s + ".html";
+ testMissingExplicitContext(script);
+ }
+ }
+
+ @Test
public void testSensitiveAttributes() {
String script = "/sensitive-attributes.html";
CompilationResult result = compile(script);
diff --git a/src/test/resources/missing-explicit-context-mac.html b/src/test/resources/missing-explicit-context-mac.html
new file mode 100644
index 0000000..dbbe584
--- /dev/null
+++ b/src/test/resources/missing-explicit-context-mac.html
@@ -0,0 +1 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
<script>
var a = '${so
me.value}';
</script>
\ No newline at end of file
diff --git a/src/test/resources/missing-explicit-context-win.html b/src/test/resources/missing-explicit-context-win.html
new file mode 100644
index 0000000..5b507e3
--- /dev/null
+++ b/src/test/resources/missing-explicit-context-win.html
@@ -0,0 +1,19 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
+<script>
+ var a = '${some.value}';
+</script>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 01/31:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
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 6760e27321713c597496702fb96bff921f31ddd5
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Mon Sep 5 15:07:26 2016 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1759287 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 0b3d047..5cd7da3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.0</version>
+ <version>1.0.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
@@ -44,9 +44,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.0</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.0</developerConnection>
- <url>http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.0</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</developerConnection>
+ <url>http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</url>
</scm>
<properties>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 31/31:
[maven-release-plugin] copy for tag
org.apache.sling.scripting.sightly.compiler-1.0.10
Posted by ro...@apache.org.
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 fcaec058929c541b8496d33880636e591dfd0f53
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Wed Aug 2 09:51:08 2017 +0000
[maven-release-plugin] copy for tag org.apache.sling.scripting.sightly.compiler-1.0.10
git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.10@1803793 13f79535-47bb-0310-9956-ffa450edef68
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 09/31:
SLING-6399 - Implement support for date and number formatting for HTL
Posted by ro...@apache.org.
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 3f0ea53adde02feaf097c098d79fddf5f4d65e2f
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Wed Dec 14 22:13:32 2016 +0000
SLING-6399 - Implement support for date and number formatting for HTL
* implemented support for the date and number formatting features from version 1.3
of the HTL Language Specification
* applied slightly modified patch submitted by Vlad Băilescu at https://github.com/apache/sling/pull/191
(Closes #191)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1774351 13f79535-47bb-0310-9956-ffa450edef68
---
.../sling/scripting/sightly/compiler/SightlyCompiler.java | 2 +-
.../sightly/compiler/expression/nodes/NumericConstant.java | 7 +++----
.../sling/scripting/sightly/impl/filter/FormatFilter.java | 12 +++++++++++-
.../sling/scripting/sightly/impl/filter/I18nFilter.java | 6 +++++-
.../sightly/impl/frontend/ExpressionWrapperTest.java | 12 ++++++------
5 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java b/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java
index 008c89a..ed5ef36 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java
@@ -103,8 +103,8 @@ public final class SightlyCompiler {
// register filters
final List<Filter> filters = new ArrayList<>(5);
- filters.add(FormatFilter.getInstance());
filters.add(I18nFilter.getInstance());
+ filters.add(FormatFilter.getInstance());
filters.add(JoinFilter.getInstance());
filters.add(URIManipulationFilter.getInstance());
filters.add(XSSFilter.getInstance());
diff --git a/src/main/java/org/apache/sling/scripting/sightly/compiler/expression/nodes/NumericConstant.java b/src/main/java/org/apache/sling/scripting/sightly/compiler/expression/nodes/NumericConstant.java
index 22c852c..d03056c 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/compiler/expression/nodes/NumericConstant.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/compiler/expression/nodes/NumericConstant.java
@@ -49,7 +49,7 @@ public final class NumericConstant implements Atom {
* @param value the number representation
*/
public NumericConstant(Number value) {
- this.value = value.longValue();
+ this.value = value;
this.text = value.toString();
}
@@ -80,11 +80,10 @@ public final class NumericConstant implements Atom {
}
private Number parseNumber(String s) {
- try {
- return Long.parseLong(s);
- } catch (NumberFormatException e) {
+ if (s.contains(".")) {
return Double.parseDouble(s);
}
+ return Long.parseLong(s);
}
}
diff --git a/src/main/java/org/apache/sling/scripting/sightly/impl/filter/FormatFilter.java b/src/main/java/org/apache/sling/scripting/sightly/impl/filter/FormatFilter.java
index bf7291a..52e00f0 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/impl/filter/FormatFilter.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/impl/filter/FormatFilter.java
@@ -21,6 +21,7 @@ package org.apache.sling.scripting.sightly.impl.filter;
import org.apache.sling.scripting.sightly.compiler.RuntimeFunction;
import org.apache.sling.scripting.sightly.compiler.expression.Expression;
import org.apache.sling.scripting.sightly.compiler.expression.ExpressionNode;
+import org.apache.sling.scripting.sightly.compiler.expression.nodes.MapLiteral;
import org.apache.sling.scripting.sightly.compiler.expression.nodes.RuntimeCall;
/**
@@ -29,6 +30,9 @@ import org.apache.sling.scripting.sightly.compiler.expression.nodes.RuntimeCall;
public class FormatFilter extends AbstractFilter {
public static final String FORMAT_OPTION = "format";
+ public static final String TYPE_OPTION = "type";
+ public static final String FORMAT_LOCALE_OPTION = "formatLocale";
+ public static final String TIMEZONE_OPTION = "timezone";
private static final class FormatFilterLoader {
private static final FormatFilter INSTANCE = new FormatFilter();
@@ -53,7 +57,13 @@ public class FormatFilter extends AbstractFilter {
return expression;
}
ExpressionNode translation =
- new RuntimeCall(RuntimeFunction.FORMAT, expression.getRoot(), expression.removeOption(FORMAT_OPTION));
+ new RuntimeCall(RuntimeFunction.FORMAT, expression.getRoot(),
+ new MapLiteral(getFilterOptions(expression,
+ FORMAT_OPTION,
+ TYPE_OPTION,
+ I18nFilter.LOCALE_OPTION,
+ FORMAT_LOCALE_OPTION,
+ TIMEZONE_OPTION)));
return expression.withNode(translation);
}
}
diff --git a/src/main/java/org/apache/sling/scripting/sightly/impl/filter/I18nFilter.java b/src/main/java/org/apache/sling/scripting/sightly/impl/filter/I18nFilter.java
index 3fe12d5..fdb07cd 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/impl/filter/I18nFilter.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/impl/filter/I18nFilter.java
@@ -18,6 +18,8 @@
******************************************************************************/
package org.apache.sling.scripting.sightly.impl.filter;
+import java.util.Map;
+
import org.apache.sling.scripting.sightly.compiler.RuntimeFunction;
import org.apache.sling.scripting.sightly.compiler.expression.Expression;
import org.apache.sling.scripting.sightly.compiler.expression.ExpressionNode;
@@ -55,9 +57,11 @@ public final class I18nFilter extends AbstractFilter {
== ExpressionContext.PLUGIN_DATA_SLY_TEMPLATE || expressionContext == ExpressionContext.PLUGIN_DATA_SLY_CALL) {
return expression;
}
+ Map <String, ExpressionNode> options = getFilterOptions(expression, HINT_OPTION, LOCALE_OPTION, BASENAME_OPTION);
ExpressionNode translation = new RuntimeCall(RuntimeFunction.I18N, expression.getRoot(), new MapLiteral
- (getFilterOptions(expression, HINT_OPTION, LOCALE_OPTION, BASENAME_OPTION)));
+ (options));
expression.removeOption(I18N_OPTION);
+ expression.getOptions().put(FormatFilter.FORMAT_LOCALE_OPTION, options.get(LOCALE_OPTION));
return expression.withNode(translation);
}
}
diff --git a/src/test/java/org/apache/sling/scripting/sightly/impl/frontend/ExpressionWrapperTest.java b/src/test/java/org/apache/sling/scripting/sightly/impl/frontend/ExpressionWrapperTest.java
index 85ca544..a9b0588 100644
--- a/src/test/java/org/apache/sling/scripting/sightly/impl/frontend/ExpressionWrapperTest.java
+++ b/src/test/java/org/apache/sling/scripting/sightly/impl/frontend/ExpressionWrapperTest.java
@@ -74,7 +74,7 @@ public class ExpressionWrapperTest {
interpolation.addExpression(new Expression(new StringConstant("hello"), options));
ExpressionWrapper wrapper = new ExpressionWrapper(filters);
Expression result = wrapper.transform(interpolation, MarkupContext.TEXT, ExpressionContext.TEXT);
- List<ExpressionNode> xssArguments = runEmptyOptionsAndXSSAssertions(result);
+ List<ExpressionNode> xssArguments = runOptionsAndXSSAssertions(result, 1);
RuntimeCall i18n = (RuntimeCall) xssArguments.get(0);
assertEquals("Expected to I18n runtime function call.", RuntimeFunction.I18N, i18n.getFunctionName());
}
@@ -90,7 +90,7 @@ public class ExpressionWrapperTest {
interpolation.addExpression(new Expression(new StringConstant("Hello {0} {1}"), options));
ExpressionWrapper wrapper = new ExpressionWrapper(filters);
Expression result = wrapper.transform(interpolation, MarkupContext.TEXT, ExpressionContext.TEXT);
- List<ExpressionNode> xssArguments = runEmptyOptionsAndXSSAssertions(result);
+ List<ExpressionNode> xssArguments = runOptionsAndXSSAssertions(result, 0);
RuntimeCall format = (RuntimeCall) xssArguments.get(0);
assertEquals(RuntimeFunction.FORMAT, format.getFunctionName());
}
@@ -106,7 +106,7 @@ public class ExpressionWrapperTest {
interpolation.addExpression(new Expression(new ArrayLiteral(array), options));
ExpressionWrapper wrapper = new ExpressionWrapper(filters);
Expression result = wrapper.transform(interpolation, MarkupContext.TEXT, ExpressionContext.TEXT);
- List<ExpressionNode> xssArguments = runEmptyOptionsAndXSSAssertions(result);
+ List<ExpressionNode> xssArguments = runOptionsAndXSSAssertions(result, 0);
RuntimeCall join = (RuntimeCall) xssArguments.get(0);
assertEquals(RuntimeFunction.JOIN, join.getFunctionName());
}
@@ -142,13 +142,13 @@ public class ExpressionWrapperTest {
options));
ExpressionWrapper wrapper = new ExpressionWrapper(filters);
Expression result = wrapper.transform(interpolation, MarkupContext.TEXT, ExpressionContext.TEXT);
- List<ExpressionNode> xssArguments = runEmptyOptionsAndXSSAssertions(result);
+ List<ExpressionNode> xssArguments = runOptionsAndXSSAssertions(result, 0);
RuntimeCall join = (RuntimeCall) xssArguments.get(0);
assertEquals(RuntimeFunction.URI_MANIPULATION, join.getFunctionName());
}
- private List<ExpressionNode> runEmptyOptionsAndXSSAssertions(Expression result) {
- assertTrue("Expected empty options map for expression after processing.", result.getOptions().isEmpty());
+ private List<ExpressionNode> runOptionsAndXSSAssertions(Expression result, int expectedOptions) {
+ assertEquals("Options map size for expression after processing is different from expected.", expectedOptions, result.getOptions().size());
RuntimeCall xss = (RuntimeCall) result.getRoot();
assertEquals("Expected XSS escaping applied to expression.", RuntimeFunction.XSS, xss.getFunctionName());
return xss.getArguments();
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 13/31:
SLING-6399 - Implement support for date and number formatting for HTL
Posted by ro...@apache.org.
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 6b7fdbd9d1c669667aaef9b8b71e1bdd49b78f17
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Thu Dec 15 14:01:44 2016 +0000
SLING-6399 - Implement support for date and number formatting for HTL
* bumped capabilities to 1.3, corresponding to version 1.3 of the HTL Template Language Specification
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1774447 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 5f4de20..8c231a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,7 +78,8 @@
<Provide-Capability>
io.sightly.compiler; version:Version=1.0,
io.sightly.compiler; version:Version=1.1,
- io.sightly.compiler; version:Version=1.2
+ io.sightly.compiler; version:Version=1.2,
+ io.sightly.compiler; version:Version=1.3
</Provide-Capability>
</instructions>
</configuration>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 22/31:
[maven-release-plugin] prepare release
org.apache.sling.scripting.sightly.compiler-1.0.8
Posted by ro...@apache.org.
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 2329930cc1004437e3f95edd3d5bdd197030a688
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Mon Feb 27 11:02:46 2017 +0000
[maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.8
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1784528 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 1b6066d..35d43a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.7-SNAPSHOT</version>
+ <version>1.0.8</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
@@ -44,9 +44,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</developerConnection>
- <url>http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.8</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.8</developerConnection>
+ <url>http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.8</url>
</scm>
<properties>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 30/31:
[maven-release-plugin] prepare release
org.apache.sling.scripting.sightly.compiler-1.0.10
Posted by ro...@apache.org.
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 626514cf28e3c280212c33cead74ed3c4549a15b
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Wed Aug 2 09:50:54 2017 +0000
[maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.10
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1803792 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index c933ab5..3fa4821 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.9-SNAPSHOT</version>
+ <version>1.0.10</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
@@ -44,9 +44,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</developerConnection>
- <url>http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.10</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.10</developerConnection>
+ <url>http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.10</url>
</scm>
<properties>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 07/31:
SLING-6186 - Add support for checking code coverage with jacoco
Posted by ro...@apache.org.
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 45b3ff98316c1a8ab6fd39625f417c4426ca69f0
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Tue Nov 1 16:30:23 2016 +0000
SLING-6186 - Add support for checking code coverage with jacoco
* allow the jacoco version to be configurable; also downgraded to 0.7.6
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1767517 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6d18bcd..5f4de20 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,6 +51,7 @@
<properties>
<antlr.version>4.1</antlr.version>
+ <jacoco.maven.plugin.version>0.7.6.201602180812</jacoco.maven.plugin.version>
</properties>
<!-- ======================================================================= -->
@@ -157,7 +158,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>0.7.7.201606060606</version>
+ <version>${jacoco.maven.plugin.version}</version>
<executions>
<execution>
<id>default-prepare-agent</id>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 08/31:
SLING-6230 - The SightlyCompiler reports errors and warnings with an offset
by one for the line count
Posted by ro...@apache.org.
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 19c228c7d14351aad5ccd42310189b103bbfb678
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Wed Nov 2 14:01:35 2016 +0000
SLING-6230 - The SightlyCompiler reports errors and warnings with an offset by one for the line count
* corrected error and warning reporting in the compiler
* updated the htl-maven-plugin to use the new compiler version
* added tests
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1767685 13f79535-47bb-0310-9956-ffa450edef68
---
.../scripting/sightly/compiler/SightlyCompiler.java | 20 +++++++-------------
.../sightly/impl/compiler/SightlyCompilerTest.java | 13 +++++++++++++
src/test/resources/error-1.html | 19 +++++++++++++++++++
3 files changed, 39 insertions(+), 13 deletions(-)
diff --git a/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java b/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java
index 4bab4b2..008c89a 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java
@@ -146,7 +146,7 @@ public final class SightlyCompiler {
}
frontend.compile(stream, scriptSource);
for (PushStream.StreamMessage w : stream.getWarnings()) {
- ScriptError warning = getScriptError(scriptSource, w.getCode(), 0, 0, w.getMessage());
+ ScriptError warning = getScriptError(scriptSource, w.getCode(), 1, 0, w.getMessage());
compilationResult.getWarnings().add(new CompilerMessageImpl(scriptName, warning.errorMessage, warning.lineNumber, warning
.column));
}
@@ -161,26 +161,20 @@ public final class SightlyCompiler {
return compilationResult;
}
- private ScriptError getScriptError(String documentFragment, String offendingInput, int lineOffset, int column, String message) {
+ private ScriptError getScriptError(String documentFragment, String offendingInput, int lineOffset, int columnOffset, String message) {
if (StringUtils.isNotEmpty(offendingInput)) {
int offendingInputIndex = documentFragment.indexOf(offendingInput);
if (offendingInputIndex > -1) {
String textBeforeError = documentFragment.substring(0, offendingInputIndex);
- int line = 1;
- int newLine = 0;
- while (textBeforeError.length() > 0 && newLine != -1) {
- newLine = textBeforeError.indexOf(System.lineSeparator());
- if (newLine != -1) {
- line++;
- textBeforeError = textBeforeError.substring(newLine + 1, textBeforeError.length());
- }
+ int line = lineOffset + textBeforeError.length() - textBeforeError.replaceAll(System.lineSeparator(), "").length();
+ int column = textBeforeError.substring(textBeforeError.lastIndexOf(System.lineSeparator())).length();
+ if (column != columnOffset) {
+ column +=columnOffset;
}
- line = line + lineOffset;
- column = textBeforeError.length() + column + 1;
return new ScriptError(line, column, offendingInput + ": " + message);
}
}
- return new ScriptError(lineOffset, column, message);
+ return new ScriptError(lineOffset, columnOffset, message);
}
private static class ScriptError {
diff --git a/src/test/java/org/apache/sling/scripting/sightly/impl/compiler/SightlyCompilerTest.java b/src/test/java/org/apache/sling/scripting/sightly/impl/compiler/SightlyCompilerTest.java
index f9921fc..4af5713 100644
--- a/src/test/java/org/apache/sling/scripting/sightly/impl/compiler/SightlyCompilerTest.java
+++ b/src/test/java/org/apache/sling/scripting/sightly/impl/compiler/SightlyCompilerTest.java
@@ -47,6 +47,7 @@ public class SightlyCompilerTest {
List<CompilerMessage> warnings = result.getWarnings();
assertTrue("Expected compilation warnings.", warnings.size() == 1);
CompilerMessage warningMessage = warnings.get(0);
+ assertEquals("Expected warning on a different line.", 18, warningMessage.getLine());
assertTrue(script.equals(warningMessage.getScriptName()));
assertEquals("${some.value}: Element script requires that all expressions have an explicit context specified. The expression will" +
" be replaced with an empty string.", warningMessage.getMessage());
@@ -61,6 +62,8 @@ public class SightlyCompilerTest {
CompilerMessage _1stWarning = warnings.get(0);
CompilerMessage _2ndWarning = warnings.get(1);
assertEquals(script, _1stWarning.getScriptName());
+ assertEquals("Expected warning on a different line.", 17, _1stWarning.getLine());
+ assertEquals("Expected warning on a different line.", 18, _2ndWarning.getLine());
assertEquals(script, _2ndWarning.getScriptName());
assertEquals("${style.string}: Expressions within the value of attribute style need to have an explicit context option. The " +
"expression will be replaced with an empty string.", _1stWarning.getMessage());
@@ -69,6 +72,16 @@ public class SightlyCompilerTest {
}
+ @Test
+ public void testErrorReporting1() {
+ String script = "/error-1.html";
+ CompilationResult result = compile(script);
+ List<CompilerMessage> errors = result.getErrors();
+ assertTrue("Expected compilation errors.", errors.size() == 1);
+ CompilerMessage error = errors.get(0);
+ assertEquals("Error is not reported at the expected line.", 18, error.getLine());
+ }
+
private CompilationResult compile(String file) {
CompilationUnit compilationUnit = TestUtils.readScriptFromClasspath(file);
return compiler.compile(compilationUnit);
diff --git a/src/test/resources/error-1.html b/src/test/resources/error-1.html
new file mode 100644
index 0000000..5be6155
--- /dev/null
+++ b/src/test/resources/error-1.html
@@ -0,0 +1,19 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
+<ul data-sly-list="${list}">
+ <li>${item</li>
+</ul>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 11/31:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
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 d89d4caf27ee035e91a7317dc21c4cdd72ea26e0
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Thu Dec 15 13:28:56 2016 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1774439 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 2be65e9..12291eb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.4</version>
+ <version>1.0.5-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
@@ -44,9 +44,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.4</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.4</developerConnection>
- <url>http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.4</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</developerConnection>
+ <url>http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</url>
</scm>
<properties>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 03/31:
[maven-release-plugin] prepare release
org.apache.sling.scripting.sightly.compiler-1.0.2
Posted by ro...@apache.org.
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 987b681e5f3dc7eed870342cd9179da881161850
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Mon Oct 10 15:42:23 2016 +0000
[maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.2
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1764123 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 0957201..1a309be 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
@@ -44,9 +44,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</developerConnection>
- <url>http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.2</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.2</developerConnection>
+ <url>http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.2</url>
</scm>
<properties>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 17/31:
SLING-6450 - [HTL] Cannot retrieve "length" property for arrays of
primitive types
Posted by ro...@apache.org.
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 c0cc4ef79d002ad509800ddf33b963c23ec46c37
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Wed Jan 11 11:57:58 2017 +0000
SLING-6450 - [HTL] Cannot retrieve "length" property for arrays of primitive types
* treated all arrays in a unitary way, irrespective of their type, for "length" retrieval
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1778282 13f79535-47bb-0310-9956-ffa450edef68
---
.../scripting/sightly/impl/compiler/CompileTimeObjectModel.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/sling/scripting/sightly/impl/compiler/CompileTimeObjectModel.java b/src/main/java/org/apache/sling/scripting/sightly/impl/compiler/CompileTimeObjectModel.java
index af8bfc7..a01ad50 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/impl/compiler/CompileTimeObjectModel.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/impl/compiler/CompileTimeObjectModel.java
@@ -16,6 +16,7 @@
******************************************************************************/
package org.apache.sling.scripting.sightly.impl.compiler;
+import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
@@ -281,11 +282,10 @@ public final class CompileTimeObjectModel {
}
private static Object getField(Object obj, String property) {
- if (obj instanceof Object[] && "length".equals(property)) {
- // Working around this limitation: http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html#getFields%28%29
- return ((Object[]) obj).length;
- }
Class<?> cls = obj.getClass();
+ if (cls.isArray() && "length".equals(property)) {
+ return Array.getLength(obj);
+ }
try {
Field field = cls.getDeclaredField(property);
return field.get(obj);
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 02/31:
SLING-6125 - Switch HTL to OSGi R6 annotations
Posted by ro...@apache.org.
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 8848cb05f56a0003601356b812cb748cb171f2a6
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Mon Oct 10 15:39:09 2016 +0000
SLING-6125 - Switch HTL to OSGi R6 annotations
* removed maven-scr-plugin and configured maven-bundle-plugin to generate SCR metadata
* replaced Felix SCR annotations with OSGi Component + Metatype annotations
* removed unused dependencies
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1764122 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 39 ++++++++--------------
.../sightly/compiler/SightlyCompiler.java | 8 ++---
.../scripting/sightly/compiler/package-info.java | 2 +-
3 files changed, 18 insertions(+), 31 deletions(-)
diff --git a/pom.xml b/pom.xml
index 5cd7da3..0957201 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,26 +60,24 @@
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
- <artifactId>maven-scr-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>javax.jcr</groupId>
- <artifactId>jcr</artifactId>
- <version>2.0</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
+ <executions>
+ <execution>
+ <id>scr-metadata</id>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </execution>
+ </executions>
<configuration>
+ <exportScr>true</exportScr>
<instructions>
<Embed-Dependency>antlr4-runtime,org.abego.treelayout.core</Embed-Dependency>
<Provide-Capability>
- io.sightly; version:Version=1.0,
- io.sightly; version:Version=1.1,
- io.sightly; version:Version=1.2
+ io.sightly.compiler; version:Version=1.0,
+ io.sightly.compiler; version:Version=1.1,
+ io.sightly.compiler; version:Version=1.2
</Provide-Capability>
</instructions>
</configuration>
@@ -192,22 +190,11 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>1.9.5</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
+ <artifactId>powermock-reflect</artifactId>
<version>1.5.5</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java b/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java
index 508d93b..4bab4b2 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java
@@ -25,8 +25,6 @@ import java.util.List;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
import org.apache.sling.scripting.sightly.compiler.backend.BackendCompiler;
import org.apache.sling.scripting.sightly.compiler.commands.CommandStream;
import org.apache.sling.scripting.sightly.impl.compiler.CompilationResultImpl;
@@ -61,6 +59,7 @@ import org.apache.sling.scripting.sightly.impl.plugin.TestPlugin;
import org.apache.sling.scripting.sightly.impl.plugin.TextPlugin;
import org.apache.sling.scripting.sightly.impl.plugin.UnwrapPlugin;
import org.apache.sling.scripting.sightly.impl.plugin.UsePlugin;
+import org.osgi.service.component.annotations.Component;
/**
* <p>
@@ -69,8 +68,9 @@ import org.apache.sling.scripting.sightly.impl.plugin.UsePlugin;
* transpiling the commands to a JVM supported language or by directly executing them.
* </p>
*/
-@Component
-@Service(SightlyCompiler.class)
+@Component(
+ service = SightlyCompiler.class
+)
public final class SightlyCompiler {
private StreamTransformer optimizer;
diff --git a/src/main/java/org/apache/sling/scripting/sightly/compiler/package-info.java b/src/main/java/org/apache/sling/scripting/sightly/compiler/package-info.java
index 83443cc..6ffe873 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/compiler/package-info.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/compiler/package-info.java
@@ -21,7 +21,7 @@
* The {@code org.apache.sling.scripting.sightly.compiler} package defines the API exposed by the
* {@link org.apache.sling.scripting.sightly.compiler.SightlyCompiler}.
*/
-@Version("1.0.0")
+@Version("1.0.1")
package org.apache.sling.scripting.sightly.compiler;
import org.osgi.annotation.versioning.Version;
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 12/31: reverted
release
Posted by ro...@apache.org.
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 9d4d81afde92c1f0fe371d1ef44eb1fff1f0ee21
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Thu Dec 15 13:30:30 2016 +0000
reverted release
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1774441 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 12291eb..5f4de20 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.3-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 24/31: trivial:
clarified license for HTL compiler dependencies
Posted by ro...@apache.org.
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 3d214bcfdb936d632ec3c74f4e48329b26a6fd62
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Tue Feb 28 10:12:57 2017 +0000
trivial: clarified license for HTL compiler dependencies
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1784711 13f79535-47bb-0310-9956-ffa450edef68
---
src/main/appended-resources/META-INF/LICENSE | 63 ++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/src/main/appended-resources/META-INF/LICENSE b/src/main/appended-resources/META-INF/LICENSE
new file mode 100644
index 0000000..54191d1
--- /dev/null
+++ b/src/main/appended-resources/META-INF/LICENSE
@@ -0,0 +1,63 @@
+
+
+
+The org.antlr:antlr4-runtime dependency, embedded by this module, is developed under the following license:
+
+[The "BSD 3-clause license"]
+Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the copyright holder nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+The dependency org.abego.treelayout:org.abego.treelayout.core, embedded by this module, is developed under the following license:
+
+[The "BSD license"]
+Copyright (c) 2011, abego Software GmbH, Germany (http://www.abego.org)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+3. Neither the name of the abego Software GmbH nor the names of its
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 15/31:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
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 39231571dfdc589569954e0ee0631f2b778d6179
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Thu Dec 15 14:03:23 2016 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1774450 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 4fb741a..20dbf6b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.4</version>
+ <version>1.0.5-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
@@ -44,9 +44,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.4</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.4</developerConnection>
- <url>http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.4</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</developerConnection>
+ <url>http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</url>
</scm>
<properties>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 27/31:
SLING-6866 - HTL doesn't allow to overwrite the context for data-sly-text
Posted by ro...@apache.org.
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 5c2cb2188fb912387ed93a4833b512ec37f8b4a5
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Tue Jun 6 14:16:04 2017 +0000
SLING-6866 - HTL doesn't allow to overwrite the context for data-sly-text
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1797789 13f79535-47bb-0310-9956-ffa450edef68
---
.../sling/scripting/sightly/impl/plugin/TextPlugin.java | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/TextPlugin.java b/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/TextPlugin.java
index a2c03fb..f7dda86 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/TextPlugin.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/TextPlugin.java
@@ -18,8 +18,11 @@
******************************************************************************/
package org.apache.sling.scripting.sightly.impl.plugin;
+import org.apache.sling.scripting.sightly.compiler.RuntimeFunction;
import org.apache.sling.scripting.sightly.compiler.commands.OutputVariable;
+import org.apache.sling.scripting.sightly.compiler.expression.ExpressionNode;
import org.apache.sling.scripting.sightly.compiler.expression.MarkupContext;
+import org.apache.sling.scripting.sightly.compiler.expression.nodes.RuntimeCall;
import org.apache.sling.scripting.sightly.impl.compiler.Patterns;
import org.apache.sling.scripting.sightly.compiler.commands.VariableBinding;
import org.apache.sling.scripting.sightly.impl.compiler.PushStream;
@@ -45,7 +48,7 @@ public class TextPlugin extends AbstractPlugin {
public void beforeChildren(PushStream stream) {
String variable = compilerContext.generateVariable("textContent");
stream.write(new VariableBinding.Start(variable,
- compilerContext.adjustToContext(expression, MarkupContext.TEXT, ExpressionContext.TEXT).getRoot()));
+ adjustContext(compilerContext, expression, MarkupContext.TEXT, ExpressionContext.TEXT).getRoot()));
stream.write(new OutputVariable(variable));
stream.write(VariableBinding.END);
Patterns.beginStreamIgnore(stream);
@@ -57,4 +60,16 @@ public class TextPlugin extends AbstractPlugin {
}
};
}
+
+ private Expression adjustContext(CompilerContext compilerContext, Expression expression, MarkupContext markupContext,
+ ExpressionContext expressionContext) {
+ ExpressionNode root = expression.getRoot();
+ if (root instanceof RuntimeCall) {
+ RuntimeCall runtimeCall = (RuntimeCall) root;
+ if (runtimeCall.getFunctionName().equals(RuntimeFunction.XSS)) {
+ return expression;
+ }
+ }
+ return compilerContext.adjustToContext(expression, markupContext, expressionContext);
+ }
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 04/31:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
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 6f2af9fe9537c08db03ed05d4a496f48dd6a8605
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Mon Oct 10 15:42:38 2016 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1764125 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 1a309be..85135c6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.2</version>
+ <version>1.0.3-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
@@ -44,9 +44,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.2</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.2</developerConnection>
- <url>http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.2</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</developerConnection>
+ <url>http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</url>
</scm>
<properties>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[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
Posted by ro...@apache.org.
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>.
[sling-org-apache-sling-scripting-sightly-compiler] 18/31:
[maven-release-plugin] prepare release
org.apache.sling.scripting.sightly.compiler-1.0.6
Posted by ro...@apache.org.
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 7c802204c1331d3cffd3fa82b086b0036b05b38d
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Fri Jan 13 11:02:44 2017 +0000
[maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.6
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1778537 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 6fd1459..2a2586e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
@@ -44,9 +44,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</developerConnection>
- <url>http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.6</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.6</developerConnection>
+ <url>http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.6</url>
</scm>
<properties>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 28/31:
SLING-7024 - Sightly doesn't allow to emit style or on event attributes for
data-sly-attribute
Posted by ro...@apache.org.
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 f29186c9f6a1a2cbdc6fa547690682fd9d4d5a44
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Tue Aug 1 10:14:41 2017 +0000
SLING-7024 - Sightly doesn't allow to emit style or on event attributes for data-sly-attribute
* improved logging message for the AttributePlugin
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1803633 13f79535-47bb-0310-9956-ffa450edef68
---
.../apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java b/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java
index 6243821..c2316d3 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java
@@ -62,7 +62,9 @@ public class AttributePlugin extends AbstractPlugin {
public PluginInvoke invoke(Expression expression, PluginCallInfo callInfo, CompilerContext compilerContext) {
String attributeName = decodeAttributeName(callInfo);
if (attributeName != null && MarkupUtils.isSensitiveAttribute(attributeName)) {
- String warningMessage = String.format("Refusing to generate attribute '%s' for security reasons.", attributeName);
+ String warningMessage = String.format("Sensible attribute (%s) detected: event attributes (on*) and the style attribute " +
+ "cannot be generated with the data-sly-attribute block element; if you need to output a dynamic value for " +
+ "this attribute then use an expression with an appropriate context.", attributeName);
compilerContext.getPushStream().warn(new PushStream.StreamMessage(warningMessage, expression.getRawText()));
return new DefaultPluginInvoke(); //no-op invocation
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 06/31:
SLING-6224 - Expand the accepted & ignored whitespace characters for HTL
scripts
Posted by ro...@apache.org.
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 867af05fcf4764bf86aee4f407e91d5d08670e40
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Tue Nov 1 16:13:32 2016 +0000
SLING-6224 - Expand the accepted & ignored whitespace characters for HTL scripts
* expanded whitespace characters list and added tests
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1767516 13f79535-47bb-0310-9956-ffa450edef68
---
.../sling/scripting/sightly/impl/parser/expr/generated/SightlyLexer.g4 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/main/antlr4/org/apache/sling/scripting/sightly/impl/parser/expr/generated/SightlyLexer.g4 b/src/main/antlr4/org/apache/sling/scripting/sightly/impl/parser/expr/generated/SightlyLexer.g4
index 3d62153..9dc6ebf 100644
--- a/src/main/antlr4/org/apache/sling/scripting/sightly/impl/parser/expr/generated/SightlyLexer.g4
+++ b/src/main/antlr4/org/apache/sling/scripting/sightly/impl/parser/expr/generated/SightlyLexer.g4
@@ -90,6 +90,9 @@ WS : ( ' '
| '\t'
| '\r'
| '\n'
+ | '\f'
+ | '\u000B'
+ | '\u00A0'
) -> channel(HIDDEN)
;
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 23/31:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
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 448f797ab7a7d149ccb032f855a755e0f12fd9cc
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Mon Feb 27 11:03:01 2017 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1784530 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 35d43a6..d5b3c6d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.8</version>
+ <version>1.0.9-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
@@ -44,9 +44,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.8</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.8</developerConnection>
- <url>http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.8</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</developerConnection>
+ <url>http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</url>
</scm>
<properties>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 19/31:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
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 20ab94d0e7cee4c9015d288694a9b699806e0083
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Fri Jan 13 11:02:59 2017 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1778539 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 2a2586e..1b6066d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.6</version>
+ <version>1.0.7-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
@@ -44,9 +44,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.6</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.6</developerConnection>
- <url>http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.6</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</developerConnection>
+ <url>http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</url>
</scm>
<properties>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 26/31: Typo in
comment
Posted by ro...@apache.org.
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 610873fc1a8685ced9ce333631abf74e0327f5fb
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Apr 20 08:30:54 2017 +0000
Typo in comment
Fixed typo: "perhaps"
Submitted-By: Lars Trieloff
Closes #215
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1792026 13f79535-47bb-0310-9956-ffa450edef68
---
.../sling/scripting/sightly/impl/parser/expr/generated/SightlyParser.g4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/antlr4/org/apache/sling/scripting/sightly/impl/parser/expr/generated/SightlyParser.g4 b/src/main/antlr4/org/apache/sling/scripting/sightly/impl/parser/expr/generated/SightlyParser.g4
index e1c0bc8..81d511a 100644
--- a/src/main/antlr4/org/apache/sling/scripting/sightly/impl/parser/expr/generated/SightlyParser.g4
+++ b/src/main/antlr4/org/apache/sling/scripting/sightly/impl/parser/expr/generated/SightlyParser.g4
@@ -40,7 +40,7 @@ interpolation returns [Interpolation interp]
: (
textFrag { $interp.addText($textFrag.str); }
| expression { $interp.addExpression($expression.expr.withRawText($expression.text)); }
- )* //perhaphs too restrictive
+ )* //perhaps too restrictive
;
textFrag returns [String str]
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 14/31:
[maven-release-plugin] prepare release
org.apache.sling.scripting.sightly.compiler-1.0.4
Posted by ro...@apache.org.
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 2d7d0165b90712ab9bee945da3ab5f51a79d48da
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Thu Dec 15 14:03:08 2016 +0000
[maven-release-plugin] prepare release org.apache.sling.scripting.sightly.compiler-1.0.4
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1774448 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 8c231a6..4fb741a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<!-- P R O J E C T -->
<!-- ======================================================================= -->
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
- <version>1.0.3-SNAPSHOT</version>
+ <version>1.0.4</version>
<packaging>bundle</packaging>
<name>Apache Sling Scripting HTL Compiler</name>
@@ -44,9 +44,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</developerConnection>
- <url>http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.4</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.4</developerConnection>
+ <url>http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.sightly.compiler-1.0.4</url>
</scm>
<properties>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[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
Posted by ro...@apache.org.
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 <ra...@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" <co...@sling.apache.org>.
[sling-org-apache-sling-scripting-sightly-compiler] 25/31: use
Sling Parent 30
Posted by ro...@apache.org.
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 fc1c221851fe2a681db352b0b0c8a800e4e94d6f
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Mon Mar 6 10:31:22 2017 +0000
use Sling Parent 30
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1785622 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index d5b3c6d..f8d1ab1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>28</version>
+ <version>30</version>
<relativePath />
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.