rdmorganiser / rdmo

A tool to support the planning, implementation, and organization of research data management.
https://rdmorganiser.github.io
Apache License 2.0
105 stars 49 forks source link

Unwanted markdown conversion in Section title #1184

Closed MyPyDavid closed 2 weeks ago

MyPyDavid commented 2 weeks ago

Description / Beschreibung

We have a user that set a numbering on the section titles of a catalogue, eg. "1. Title". This is now with markdown converted in to a <ol> list element and appears strangely in the interview.

Section and other element titles don't need a list element in their markdown conversion I would guess. Should we specify and strip certain html elements depending on which rdmo element field does the conversion? Otherwise, can we add an ignore string to the conversion method? Any other suggestions?

Expected behaviour / Erwartetes Verhalten

Have a section title with text "1. Title" be displayed normally .

Steps to reproduce / Schritte zum Reproduzieren

  1. add a section title with text "1. Title"
  2. go to interview and see markdown converted <ol> in the section title

Context / Kontext

Version 2.2.1

References / Verweise

  1. Bird
  2. McHale
  3. Parish

It’s important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:

  1. Bird
  2. McHale
  3. Parish
jochenklar commented 2 weeks ago

Hmm, it makes no sense to have ol (or ul) in the titles or the text of a question, but in a help text it makes sense. I am a bit hesitant to create different markdown workarounds for different fields and different markdown features. The easiest solution would be to escape the syntax: 1\. Title.

MyPyDavid commented 2 weeks ago

Indeed.. thanks for the escape solution. Our users will just have to hack the syntax then, insofar as it's not a problem for anyone else this can be closed.