You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2017/11/28 15:00:29 UTC
[myfaces-tobago] branch master updated: TOBAGO-1826 Possibility to
access the "markup"s via JavaScript * markups are now separable with
'space'
This is an automated email from the ASF dual-hosted git repository.
hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
The following commit(s) were added to refs/heads/master by this push:
new fc2ab8d TOBAGO-1826 Possibility to access the "markup"s via JavaScript * markups are now separable with 'space'
fc2ab8d is described below
commit fc2ab8d43a5790c1f7cf8d3d6da20a6d8f406aeb
Author: Henning Noeth <hn...@apache.org>
AuthorDate: Tue Nov 28 16:00:21 2017 +0100
TOBAGO-1826 Possibility to access the "markup"s via JavaScript
* markups are now separable with 'space'
---
tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java | 2 +-
.../src/test/java/org/apache/myfaces/tobago/context/MarkupUnitTest.java | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
index fe48993..3ea69a8 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
@@ -245,7 +245,7 @@ public final class Markup implements Serializable, Iterable<String> {
if (StringUtils.isEmpty(value)) {
return null;
}
- if (value.contains(",")) {
+ if (value.contains(" ") || value.contains(",")) {
final String[] strings = StringUtils.split(value, ", \t\n");
return new Markup(strings);
} else {
diff --git a/tobago-core/src/test/java/org/apache/myfaces/tobago/context/MarkupUnitTest.java b/tobago-core/src/test/java/org/apache/myfaces/tobago/context/MarkupUnitTest.java
index 1fbc819..b36f156 100644
--- a/tobago-core/src/test/java/org/apache/myfaces/tobago/context/MarkupUnitTest.java
+++ b/tobago-core/src/test/java/org/apache/myfaces/tobago/context/MarkupUnitTest.java
@@ -42,6 +42,8 @@ public class MarkupUnitTest {
Assert.assertArrayEquals(AB, toArray(Markup.valueOf("a, b").iterator()));
+ Assert.assertArrayEquals(AB, toArray(Markup.valueOf("a b").iterator()));
+
Assert.assertArrayEquals(AB, toArray(Markup.valueOf(", \ta , ,\n b ,").iterator()));
}
--
To stop receiving notification emails like this one, please contact
['"commits@myfaces.apache.org" <co...@myfaces.apache.org>'].