Open firasm opened 3 years ago
On the Illinois server, the sample course question at issue is: https://www.prairielearn.org/pl/course/108/question/4111573/preview
Thanks @echuber2 , I'll update to the US server since it's more general.
Similarly, this question from the sample course doesn't show the # Hello, World rendered, but it does when you add a line break after opening the
tag.
From what I could gather, the issue here is that there is a comment in the second line of the file that includes a <markdown>
tag.
https://github.com/PrairieLearn/PrairieLearn/blob/ee607c24e6461abe4abd4edb6a017292f9461da1/exampleCourse/questions/element/markdown/question.html#L2
This tag (not the one in line 5) is the one that starts the actual markdown processing, so the heading is actually inside an "HTML" tag (the "pl-question-panel"), which causes it to not render markdown until the next line break. I'm reviewing this in #10539.
But this, does not work as expected (extra indent):
<markdown> <h1>This is a heading</h1> # This is also a heading </markdown>
This is not valid markdown. The 4 extra spaces in the beginning mean that this is a code block.
Table issue: there is indeed no default formatting for tables. You can format it with CSS or by using HTML instead.
Ah good catch!
Re: tables - I agree, 3 years ago I thought tables were part of commonmark but they are indeed not.
Thanks for working on updating the markdown library!
I'm using this issue to track all markdown rendering issues.
Headings
This works:
But this, does not work as expected (extra indent):
Similarly, this question from the sample course doesn't show the
# Hello, World
rendered, but it does when you add a line break after opening the<markdown>
tag.Oddly, the behaviour isn't consistent as this simple example does work:
Table
I'm not sure if this is a CSS/formatting issue, but if in a
question.html
I write something like this:It renders as:
It should instead render as a table with lines, rows, etc..: