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

Don't use linebreaks filter in Markdown templates (#64) #133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rvesse
Copy link

@rvesse rvesse commented Sep 27, 2023

The Markdown Django templates were using the linebreaks filter on some of the content. This filter wraps content using <p> and <br />. However this means that if the ontology was using Markdown in their comments this would not get rendered as most Markdown renderers don't apply rendering inside of HTML block elements like <p>. It was also unnecessary since Markdown renderers already use line breaks to suitably render paragraphs.

This was most applicable for descriptions of things since those are the places were ontology authors were most likely to want to use Markdown to explain the intended usage of their ontology concepts.

By removing the use of this filter the ontology descriptions are output as-is in the generated Markdown files allowing any Markdown in them to be rendered by whatever Markdown renderer the user ultimately chooses.

This resolves #64

The Markdown Django templates were using the linebreaks filter on some
of the content.  This filter wraps content using <p> and <br />.
However this means that if the ontology was using Markdown in their
comments this would not get rendered as most Markdown renderers don't
apply rendering inside of HTML block elements like <p>.  It was also
unnecessary since Markdown renderers already use line breaks to suitably
render paragraphs.

This was most applicable for descriptions of things since those are the
places were ontology authors were most likely to want to use Markdown to
explain the intended usage of their ontology concepts.

By removing the use of this filter the ontology descriptions are output
as-is in the generated Markdown files allowing any Markdown in them to
be rendered by whatever Markdown renderer the user ultimately chooses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use markdown in rdfs:comments and other fields
1 participant