FHIR Chat · How do I add markdown to description? · hapi

Stream: hapi

Topic: How do I add markdown to description?


view this post on Zulip Yunwei Wang (Aug 27 2018 at 21:33):

How do I do the markdown? Here is my code segment:

CodeSystem cs = new CodeSystem();
cs.setDescription("<i>this is a test</i>");

The output is

<description value="&lt;i&gt;this is a test&lt;/i&gt;"/>

view this post on Zulip Grahame Grieve (Aug 27 2018 at 21:34):

that's html not markdown

view this post on Zulip Grahame Grieve (Aug 27 2018 at 21:34):

what do you mean 'do markdown'?

view this post on Zulip Yunwei Wang (Aug 27 2018 at 21:35):

I thought markdown include html tags. No?

view this post on Zulip Grahame Grieve (Aug 27 2018 at 21:37):

no. we're using GFM, which is commonmark with the rule that there's no html tags. See

view this post on Zulip Grahame Grieve (Aug 27 2018 at 21:37):

https://github.github.com/gfm/

view this post on Zulip Yunwei Wang (Aug 27 2018 at 21:47):

Thanks. Then I need to find a different way solution for UTG.

view this post on Zulip Grahame Grieve (Aug 27 2018 at 22:28):

what are you trying to do?

view this post on Zulip Yunwei Wang (Sep 01 2018 at 02:16):

@Grahame Grieve Some v3 code systems have <i> tag in their description. I was trying to export that to FHIR CodeSystem resource as part of UTG project. Since that is not possible, I decided to just omit <i> tag and export its content only.

view this post on Zulip Grahame Grieve (Sep 01 2018 at 02:17):

you can replace that one easily with markdown. some other html tags might be harder work

view this post on Zulip Yunwei Wang (Sep 01 2018 at 02:21):

Yes I know. I had a hard time to retrieve inner xml as a string in JAVA. Cannot believe JAVA xml node doesn't have that function. Ted will talk to Lloyd on some UTG publishing issues. I will update project based on their discussion.

view this post on Zulip Grahame Grieve (Sep 01 2018 at 02:56):

of course it has that function. what XML parser ar we using?


Last updated: Apr 12 2022 at 19:14 UTC