Closed lukasrad02 closed 5 months ago
We are using https://github.com/torchbox/wagtail-markdown which in turn actually uses the Markdown compiler that you linked to. Abbreviations are a built-in extension as documented in https://python-markdown.github.io/extensions/abbreviations/
The way this works is by appending all of the abbreviations to the body of the page. The markdown renderer will then take the whole thing and place the abbreviations in the generated HTML. If the block cannot be parsed correctly, they will be left as-is and thats why you see them in the raw form at the end of the page. In my experience this only happens if the markdown is invalid. When looking at https://python-markdown.github.io/extensions/tables/ I guess that your example uses three vertical separators whereas the docs only use one in the middle
In my experience this only happens if the markdown is invalid. When looking at https://python-markdown.github.io/extensions/tables/ I guess that your example uses three vertical separators whereas the docs only use one in the middle
Same issue when using the example from the docs (copied as-is):
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell
Aside from that, column separators at the outside (as in my first example) should be valid to, as the python docs refer to https://michelf.ca/projects/php-markdown/extra/#table for the syntax and this page states:
If you wish, you can add a leading and tailing pipe to each line of the table. Use the form that you like. As an illustration, this will give the same result as above:
| First Header | Second Header | | ------------- | ------------- | | Content Cell | Content Cell | | Content Cell | Content Cell |
(This markdown code does not work either)
Interesting. Then I'm currently out of ideas and someone needs to debug this properly
When a page ends with a table, the list of abbreviations is visible on the rendered page as markdown.
Steps to reproduce
Expected result
The rendered page ends with the table. When hovering the "demo" text, the explanation is shown in a tooltip.
Actual result
The rendered page ends with
*[demo]: explanation of demo
below the table and no explanation for "demo" is shown on hover.Workarounds and further information
Trailing spaces or newlines following the table don't matter, but adding any other content behind the table fixes the issue.
The table rendering differs depending on whether it is the last element or not. In the first case, it is using the full page with,. while in the latter case, it only as wide as its contents:
It seems like we're using https://pypi.org/project/Markdown/ to transform the markdown to HTML (however, I could not find this or any other markdown compiler in the pyproject, did I miss something?). The python library refers to https://daringfireball.net/projects/markdown/syntax for a list of supported markdown features. This feature list neither includes tables nor abbreviations. Do we have some custom code for this I just did not find?