HL7 / fhir-ig-publisher

Source code for the IG publisher
Apache License 2.0
69 stars 57 forks source link

Relative Markdown links become absolute in element comments of child profiles #245

Open masnick opened 3 years ago

masnick commented 3 years ago

If I specify a relative Markdown link like * someElement ^comment = "[link](conformance.html)" in Profile A, and then create Profile B as a child of Profile A, this will show up as http://hl7.org/fhir/R4/conformance.html in the html page for Profile B generated by the publisher. The link is a working relative link in Profile A.

You can see this in action here. The parent profile is here with a working relative link to conformance.html and the child profile is here but links to http://hl7.org/fhir/R4/conformance.html instead of conformance.html.

JohnMoehrke commented 3 years ago

this seems similar or related to my issue. markdown relative URLs work on the artifacts.html page, but on the profile page they are to the FHIR R4 core page (like expressed above).

JohnMoehrke commented 3 years ago

https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/Profile.20description.20markdown.20URLs

masnick commented 2 years ago

It appears the original issue is resolved, but now I am seeing the following when a definition for an element in a profile includes [data minimization reasons](profiles.html#data-minimization-and-privacy):

The link 'StructureDefinition-shc-covid19-laboratory-result-observation-ad.html/profiles.html#data-minimization-and-privacy' for "data minimization reasons" cannot be resolved

I will post a git hash for reproduction shortly.

masnick commented 2 years ago

If you check out this commit and build with the IG Publisher, you should be able to reproduce this behavior: https://github.com/HL7/fhir-shc-vaccination-ig/commit/333eeb2d1ee7b433011bc6ea34a8dcc4a2899312

Note that the errors are suppressed in ignoreWarnings.txt.