-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Describe the bug
When generating HTML from an RDF/XML ontology file with markdown in rdfs:comment annotations, newlines are removed, resulting in missing paragraph and list tags in the rendered HTML.
To Reproduce
Steps to reproduce the behavior:
- Add some newlines and
*or-list items in Markdown format, in therdfs:commenttext for anowl:Classannotation in an RDF/XML serialized ontology. - Render docs from said ontology using something like
java -jar bin/widoco-1.4.25-jar-with-dependencies_JDK-11.jar -ontFile ONTOLOGY.owl -outFolder docs -oops -rewriteAll -uniteSections -webVowl - Open rendered documentation in your browser
- Look for
<p>and<ul><li>tags in the Class description HTML - Observe no paragraph or list tags, newlines are removed from the innerText, and
-and*characters are left intact.
Expected behavior
I expected the newlines to persist in the Markdown-formatted rdfs:comment annotations, and result in paragraphs and lists rendered in HTML.
Screenshots
Let me know if it's helpful to see an image of the markup or something, but hopefully my description above is clear :)
Desktop (please complete the following information):
- OS: Linux (Ubuntu 22.04)
- Browser Firefox
- Version 138.0.1
(I don't believe this is particularly relevant, but I'm running openJDK 11 and Widoco 1.4.25)
Additional context
I've poked at this to understand that the marked library is running correctly against these Class descriptions, but the text that's in there is missing newlines that are present in the source file I'm pointing Widoco too. I gather from this that the code that's loading my Ontology in order to produce this HTML is sanitizing or otherwise "cleaning" this text somewhere along the line. I haven't been able to track down where that is, but if I find it (or someone more knowledgeable points me to it) I'll happily take a crack at improving this :)