You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by dd...@apache.org on 2015/12/17 14:39:26 UTC
incubator-freemarker-docgen git commit: Empty link-s with no nested
link text also show the target URL in the output.
Repository: incubator-freemarker-docgen
Updated Branches:
refs/heads/master 79f08970e -> 5386820d7
Empty link-s with no nested link text also show the target URL in the output.
Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker-docgen/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker-docgen/commit/5386820d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker-docgen/tree/5386820d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker-docgen/diff/5386820d
Branch: refs/heads/master
Commit: 5386820d775a9a4d0d296c3b63de50788a5a9dee
Parents: 79f0897
Author: ddekany <dd...@apache.org>
Authored: Thu Dec 17 14:39:08 2015 +0100
Committer: ddekany <dd...@apache.org>
Committed: Thu Dec 17 14:39:08 2015 +0100
----------------------------------------------------------------------
src/main/org/freemarker/docgen/templates/node-handlers.ftlh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-freemarker-docgen/blob/5386820d/src/main/org/freemarker/docgen/templates/node-handlers.ftlh
----------------------------------------------------------------------
diff --git a/src/main/org/freemarker/docgen/templates/node-handlers.ftlh b/src/main/org/freemarker/docgen/templates/node-handlers.ftlh
index 892423e..9b990e8 100644
--- a/src/main/org/freemarker/docgen/templates/node-handlers.ftlh
+++ b/src/main/org/freemarker/docgen/templates/node-handlers.ftlh
@@ -123,7 +123,8 @@
<#if .node.@linkend?hasContent>
<a href="${CreateLinkFromID(.node.@linkend)}"><#recurse></a><#t>
<#else>
- <a href="${.node["@xlink:href"]}"><#recurse></a><#t>
+ <#local url = .node["@xlink:href"]>
+ <a href="${url}"><#if .node?children?size != 0><#recurse><#else>${url}</#if></a><#t>
</#if>
</#macro>