Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self closing span "text-decoration:line-through", which is illegal, is showing up in structureDefinition resource.text.div narrative #976

Open
JohnMoehrke opened this issue Oct 23, 2024 · 4 comments
Assignees
Labels
Approved Change has been reviewed and accepted and can now be applied to the templates bug Something isn't working

Comments

@JohnMoehrke
Copy link
Contributor

A tag is not allowed to be self-closing. Browsers tend to render it as if the span is not self-closed, and have indeterminant behavior around auto closing. https://stackoverflow.com/questions/2816833/can-a-span-be-closed-using-span

Note that the .html files do not have the same problem. Thus the conversion to/from the text.div seems to correct it. --- NOTE that a few months ago the .html files did have the problem, so some fix was made, but didn't fix the .text.div.

Typically this is found when a structureDefinition sets a cardinality (e.g. 0..0)

Low priority because the .html files are okay.

@lmckenzi
Copy link
Contributor

@JohnMoehrke Can you provide a specific example of what you're seeing that needs to be fixed. (Or at least point to a specific example where problematic narrative exists.)

@JohnMoehrke
Copy link
Contributor Author

for example
https://profiles.ihe.net/ITI/PDQm/StructureDefinition-IHE.PDQm.Patient.json

has

...
<span style=\"text-decoration:line-through\">implicitRules</span><a name=\"Patient.implicitRules\"> </a></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"text-decoration:line-through\"/><span style=\"text-decoration:line-through\">0</span><span style=\"text-decoration:line-through\">..</span><span style=\"text-decoration:line-through\">0</span>
...

where most span setting line-through are properly closed, except ONE

<span style="text-decoration:line-through"/>

which is self closing.

@JohnMoehrke
Copy link
Contributor Author

JohnMoehrke commented Oct 29, 2024

note that the above artifact in the .html has proper close

 <span style="text-decoration:line-through"></span>

although this is a very useless span.. it is at least not wrong.

@lmckenzi
Copy link
Contributor

We should either not create the span or should trim empty spans.

@lmckenzi lmckenzi added bug Something isn't working Approved Change has been reviewed and accepted and can now be applied to the templates labels Oct 29, 2024
@lmckenzi lmckenzi moved this from Inbox to To do in IG Publisher issue board Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Change has been reviewed and accepted and can now be applied to the templates bug Something isn't working
Projects
Development

No branches or pull requests

2 participants