mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-02 01:19:14 +00:00
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) {
|
||||
super(context);
|
||||
hostMd = new InternalMarkdownProcessor();
|
||||
corePath = context.getContext().getSpecUrl();
|
||||
}
|
||||
|
||||
public StructureDefinitionRenderer(RenderingContext context, ResourceContext rcontext) {
|
||||
@ -3353,8 +3354,15 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
|
||||
if (compare == null || mode == GEN_MODE_DIFF) {
|
||||
if (md.hasValue()) {
|
||||
String xhtml = hostMd.processMarkdown(location, md);
|
||||
if (Utilities.noString(xhtml)) {
|
||||
return null;
|
||||
}
|
||||
XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
|
||||
renderStatusDiv(md, x).add(new XhtmlParser().parseFragment(xhtml));
|
||||
try {
|
||||
renderStatusDiv(md, x).add(new XhtmlParser().parseFragment(xhtml));
|
||||
} catch (Exception e) {
|
||||
x.span("color: maroon").tx(e.getLocalizedMessage());
|
||||
}
|
||||
return x;
|
||||
} else {
|
||||
return null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user