Stream: IG creation
Topic: Templates and markdown
Grahame Grieve (Sep 02 2020 at 22:26):
@Lloyd McKenzie how do the templates process markdown?
Lloyd McKenzie (Sep 02 2020 at 22:53):
They were using a liquid command, but I believe Eric made changes because it was causing him grief
Grahame Grieve (Sep 02 2020 at 22:59):
@Sean McIlvenna created this:
https://github.com/hapifhir/org.hl7.fhir.core/issues/310
but it turns out that the IG publisher doesn't do anything with those 2 fields; it's the template that builds the html in question, so it's the template that needs to process them as markdown
Eric Haas (Sep 03 2020 at 00:10):
FHIR-28140 shows a screenshot of the artifacts table which I have not touched. The other one only shows up in the SD narrative I believe.
Sean McIlvenna (Sep 03 2020 at 14:08):
So, how do we update the template to process those two fields as markdown?? @Eric Haas @Lloyd McKenzie
Eric Haas (Sep 03 2020 at 14:11):
this field is all Lloyds handiwork ...
Sean McIlvenna (Sep 03 2020 at 14:13):
ok... @Lloyd McKenzie ?
Eric Haas (Sep 03 2020 at 14:14):
this one I presumed was the ig-publisher since that is in the SD narrative
Lloyd McKenzie (Sep 03 2020 at 14:17):
I'll be looking at templates again post-WGM
Jose Costa Teixeira (Sep 03 2020 at 14:29):
can't we |markdownify
the entire content in the layout?
Eric Haas (Sep 03 2020 at 14:48):
actually the first one looked like the artifact summary but I am wrong it is not. @sean where is the rendered output and source for this?
Eric Haas (Sep 03 2020 at 14:52):
I was thinking markdown="1" in the generated artifacts.
Lloyd McKenzie (Sep 03 2020 at 15:02):
We don't want to markdownify content that isn't explicitly expected to be markdown - that causes nasty side-effects
Lloyd McKenzie (Sep 03 2020 at 15:03):
We want to invoke markdownify on those specific elements that should be converted (and are required to be markdown). Where things get a bit messy is where stuff wasn't markdown in R4 but is in R5. Simplest is to make it markdown regardless of version, but that could cause rendering issues with older IGs
Grahame Grieve (Sep 03 2020 at 20:18):
@Eric Haas yes that bit comes from the IG publisher. I apparently missed and clicked on the same task twice. @Sean McIlvenna now that I look in the code, I'm not so sure about the wisdom of making the constraint.human into markdown - it gets used in a lot of contexts where html is not in the picture. It would be better to leave it as a plain string for use in those contexts and provide a markdown variant in an extension (we have a markdown extension)
Sean McIlvenna (Sep 03 2020 at 20:29):
@Grahame Grieve I'll defer to your suggestion. I'm happy to use an extension instead, I just need to know what the extension is; maybe an example of how to render that field as markdown
Grahame Grieve (Sep 03 2020 at 20:32):
http://hl7.org/fhir/StructureDefinition/rendering-markdown
so
<constraint>
<key value="act-er-1"/>
<severity value="error"/>
<human value="Only one of observation, regionOfInterest, observationMedia, substanceAdministration, supply, procedure, encounter, organizer, and act">
<extension url="">
<valueMarkdown value="**Only one** of (```observation, regionOfInterest, observationMedia, substanceAdministration, supply, procedure, encounter, organizer, act```)"/>
</extension>
</human>
<expression value="(observation | regionOfInterest | observationMedia | substanceAdministration | supply | procedure | encounter | organizer | act).count() = 1"/>
<source value=""/>
</constraint>
Last updated: Apr 12 2022 at 19:14 UTC