Stream: committers
Topic: Example with line-breaks in element comments?
Sean McIlvenna (Mar 24 2022 at 17:25):
I have the following comment:
<comment value="To reference (using relatesTo) a Bundle of type "document" or another Composition where you only have the identifier, use a resourceReference with an identifier.\nHere is an example of using relatesTo to reference another Bundle of type "document" or Composition where you only have the identifier:
` ` `
<relatesTo>
<type value="replaces" />
<resourceReference>
<identifier>
<system value="..." />
<value value="..." />
</identifier>
</resourceReference>
</relatesTo>
` ` `"/>
But it renders the example as a single line. How do I add line-breaks to the example that would show up in comments? I tried adding <br/>
. Is this possible?
Lloyd McKenzie (Mar 24 2022 at 19:22):
This is a markdown question. @Eric Haas?
Eric Haas (Mar 24 2022 at 19:32):
wrap indented/formatted text with <pre> and </pre> instead and see if that works
John Moehrke (Mar 24 2022 at 19:34):
this is a markdown question? can we see the source?
Lloyd McKenzie (Mar 24 2022 at 20:12):
"comment" is an element with a type of 'markdown'.
John Moehrke (Mar 24 2022 at 20:37):
ah, now I understand the context.
John Moehrke (Mar 24 2022 at 20:38):
the html escaping inside a markdown blob threw me
John Moehrke (Mar 24 2022 at 20:46):
I have one in my BasicAudit IG --- in the context of an example, where the IG xml has the description holding markdown that has code block.
<name value="Audit Example of ITI-78 at Consumer"/>
<description value="Audit Event for PDQm Query Transaction by the Patient Identifier Cross-reference Consumer

where the Query was executed with a GET as follows:

```
GET https://server.example.com/fhir/Patient?family=MOHR&given=ALICE&active=true&gender=female
Accept: application/fhir+json; fhirVersion=4.0
```"/>
<exampleCanonical value="https://profiles.ihe.net/ITI/basicaudit/StructureDefinition/IHE.BasicAudit.Query"/>
John Moehrke (Mar 24 2022 at 20:46):
you can see this rendered on the Artifacts page (way at the bottom)
https://profiles.ihe.net/ITI/basicaudit/artifacts.html
John Moehrke (Mar 24 2022 at 20:47):
for me this was easy, as I get to craft this in Sushi.
John Moehrke (Mar 24 2022 at 20:50):
let me point at the fsh file
John Moehrke (Mar 24 2022 at 20:51):
https://github.com/IHE/ITI.BasicAudit/blob/main/input/fsh/ex-audit-78.fsh
Sean McIlvenna (Mar 24 2022 at 22:14):
Thanks all! I have line-breaks now...
Now just trying to figure out if is needed for indenting each line.
Sean McIlvenna (Mar 24 2022 at 22:14):
Should have the rest figured out soon
Sean McIlvenna (Mar 24 2022 at 22:14):
Appreciate the help
Eric Haas (Mar 26 2022 at 16:12):
Also need to escape the html within pre tags. That tidbit also gets me
Eric Haas (Mar 26 2022 at 16:12):
The html <> to be orecise
Last updated: Apr 12 2022 at 19:14 UTC