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 2018/07/26 23:19:43 UTC

[sling-whiteboard] branch master updated: Make sure jcr:title is a String

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 6d5c3f2  Make sure jcr:title is a String
6d5c3f2 is described below

commit 6d5c3f2fc371b876839e3a1ecacac5ad174a4acf
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Jul 27 01:19:21 2018 +0200

    Make sure jcr:title is a String
    
    HTL does not output it otherwise.
---
 .../main/java/org/apache/sling/mdresource/impl/MarkdownResource.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mdresourceprovider/src/main/java/org/apache/sling/mdresource/impl/MarkdownResource.java b/mdresourceprovider/src/main/java/org/apache/sling/mdresource/impl/MarkdownResource.java
index 8201b30..af55bcf 100644
--- a/mdresourceprovider/src/main/java/org/apache/sling/mdresource/impl/MarkdownResource.java
+++ b/mdresourceprovider/src/main/java/org/apache/sling/mdresource/impl/MarkdownResource.java
@@ -219,7 +219,7 @@ public class MarkdownResource extends AbstractResource {
 			if ( n instanceof Heading ) {
 				Heading h = (Heading) n;
 				if ( h.getLevel() == 1 ) {
-					p.put("jcr:title", h.getText());
+					p.put("jcr:title", h.getText().toString());
 					return true;
 				}
 			}