fix broken links

This commit is contained in:
Grahame Grieve 2019-03-15 12:03:25 +11:00
parent 00ec0e2662
commit 9b19d02352
2 changed files with 8 additions and 2 deletions

View File

@ -2626,7 +2626,8 @@ public class ProfileUtilities extends TranslatingUtilities {
c.addPiece(checkForNoChange(fallback.getShortElement(), gen.new Piece(null, gt(fallback.getShortElement()), null)));
}
if (url != null) {
if (!c.getPieces().isEmpty()) c.addPiece(gen.new Piece("br"));
if (!c.getPieces().isEmpty())
c.addPiece(gen.new Piece("br"));
String fullUrl = url.startsWith("#") ? baseURL+url : url;
StructureDefinition ed = context.fetchResource(StructureDefinition.class, url);
String ref = null;
@ -2831,7 +2832,8 @@ public class ProfileUtilities extends TranslatingUtilities {
c.getPieces().add(checkForNoChange(definition.getFixed(), gen.new Piece(null, "\""+buildJson(definition.getFixed())+"\"", null).addStyle("color: darkgreen")));
} else {
if (url != null) {
if (!c.getPieces().isEmpty()) c.addPiece(gen.new Piece("br"));
if (!c.getPieces().isEmpty())
c.addPiece(gen.new Piece("br"));
String fullUrl = url.startsWith("#") ? baseURL+url : url;
StructureDefinition ed = context.fetchResource(StructureDefinition.class, url);
String ref = null;

View File

@ -681,6 +681,10 @@ public abstract class BaseWorkerContext implements IWorkerContext {
if (uri.startsWith("http:") || uri.startsWith("https:")) {
String version = null;
if (uri.contains("|")) {
version = uri.substring(uri.lastIndexOf("|")+1);
uri = uri.substring(0, uri.lastIndexOf("|"));
}
if (uri.contains("#"))
uri = uri.substring(0, uri.indexOf("#"));
if (class_ == Resource.class || class_ == null) {