fix bug in structure definition creating links to core spec
This commit is contained in:
parent
d571f48376
commit
a87e4728a4
|
@ -338,6 +338,7 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
|
||||||
public StructureDefinitionRenderer(RenderingContext context) {
|
public StructureDefinitionRenderer(RenderingContext context) {
|
||||||
super(context);
|
super(context);
|
||||||
hostMd = new InternalMarkdownProcessor();
|
hostMd = new InternalMarkdownProcessor();
|
||||||
|
corePath = context.getContext().getSpecUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
public StructureDefinitionRenderer(RenderingContext context, ResourceContext rcontext) {
|
public StructureDefinitionRenderer(RenderingContext context, ResourceContext rcontext) {
|
||||||
|
@ -3353,8 +3354,15 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
|
||||||
if (compare == null || mode == GEN_MODE_DIFF) {
|
if (compare == null || mode == GEN_MODE_DIFF) {
|
||||||
if (md.hasValue()) {
|
if (md.hasValue()) {
|
||||||
String xhtml = hostMd.processMarkdown(location, md);
|
String xhtml = hostMd.processMarkdown(location, md);
|
||||||
|
if (Utilities.noString(xhtml)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
|
XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
|
||||||
|
try {
|
||||||
renderStatusDiv(md, x).add(new XhtmlParser().parseFragment(xhtml));
|
renderStatusDiv(md, x).add(new XhtmlParser().parseFragment(xhtml));
|
||||||
|
} catch (Exception e) {
|
||||||
|
x.span("color: maroon").tx(e.getLocalizedMessage());
|
||||||
|
}
|
||||||
return x;
|
return x;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue