Closed paulehoffman closed 2 years ago
I believe this goes into the right direction, but... what would be the definition of an "HTML paragraph"? If this implies "anything allowed inside \
...\
", I don't see how that would allow introduction of Markdown. I think what we can say is "plain text that is not preformatted".(ironically, I had to edit this comment multiple times until the angle brackets displayed as intended)
Also in preparation for the change to Markdown, blank lines should not be allowed between #-style directives. (I don't know if this is the case now.)
I agree that we should clarify that the expected behavior is. Currently the first line not starting with a # is used to determine whether plain text or html format is used. This does not make any sense if the line is empty. One obvious change is that these empty lines are not used for format validation.
What is your expectation how these lines should be handled?
I agree with our README wording being "plain text is not formatted". For simplicity, I think the current code should just wrap the whole annotation in p ... /p even if the annotation has blank lines in it.
For simplicity, it is OK for us to keep the logic of "first line not starting with a #" is the beginning of the annotation body.
Is this sufficient to act on?
yes, I'll change that the plain text will be embedded in <p>
instead of <pre>
and create a PR referencing this ticket.
I propose a major to the way we process annotations in preparation for a later migration to Markdown for annotations that are not explicitly HTML. If the text of the annotation does not begin with a "<", the annotation body should be considered an HTML paragraph, not pre-formatted text. This should not affect any current annotations; in fact, it makes a set of anticipated annotations work better.
Also in preparation for the change to Markdown, blank lines should not be allowed between #-style directives. (I don't know if this is the case now.)
If we make this change, I will update the README.
@mboe @reschke Please comment.