fix bug in rendering of relative references

This commit is contained in:
Grahame Grieve 2020-06-24 15:07:02 +10:00
parent c2c10872e1
commit 37bd445ed4
1 changed files with 6 additions and 0 deletions

View File

@ -122,6 +122,10 @@ public abstract class ResourceRenderer extends DataRenderer {
} }
public void renderReference(ResourceWrapper rw, XhtmlNode x, Reference r, boolean allowLinks) throws UnsupportedEncodingException, IOException { public void renderReference(ResourceWrapper rw, XhtmlNode x, Reference r, boolean allowLinks) throws UnsupportedEncodingException, IOException {
if (r == null) {
x.tx("null!");
return;
}
XhtmlNode c = null; XhtmlNode c = null;
ResourceWithReference tr = null; ResourceWithReference tr = null;
if (r.hasReferenceElement() && allowLinks) { if (r.hasReferenceElement() && allowLinks) {
@ -132,6 +136,8 @@ public abstract class ResourceRenderer extends DataRenderer {
c = x.ah(tr.getReference()); c = x.ah(tr.getReference());
else else
c = x.ah(r.getReference()); c = x.ah(r.getReference());
} else {
c = x.ah(r.getReference());
} }
} else { } else {
c = x.span(null, null); c = x.span(null, null);