Problem/Motivation
GFM-style tables does not render correctly using the standard Markdown Smörgåsbord variant.
Steps to reproduce
Enable the Markdown filter, add the power-user mode, settings, remove the "Limit..." filter.
Add a simple Markdown table.
It only renders the text of the table.
If I add
function MY_MODULE_markdown_easy_environment_modify(Environment &$environment): void {
(...)
$environment->addExtension(new TableExtension());
}
it starts to render correctly.
According to the Commonmark spec, it should be included in GFM.
Proposed resolution
Document that it must be added in the callback.
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
oscillator commentedComment #3
ultimike@oscillator - I just tested this as you described using both the -dev and 2.0.0 versions of the module:
1. Fresh Drupal 11 site.
2. I tried it with and without the power user mode settings enabled.
3. I used Markdown Smorgasbord with the "Limit HTML..." filter disabled. For the text format I used, the only enabled filter was Markdown Easy.
4. I did not add the
MY_MODULE_markdown_easy_environment_modify()hook implementation as you suggested.4. I used the following syntax for my test node (via https://www.markdownlang.com/extended/tables.html):
5. The table rendered as expected:
What did I miss?
thanks,
-mike
Comment #4
oscillator commentedThank you @ultimike, for testing!
Then it seems I have some problem with my installation/deployment or there is some conflict in the Text Format. I will investigate further tomorrow!
Once again, thank you!
Comment #5
oscillator commentedI can't really find anything that points me to the problem. I had "the other" Markdown module installed previously, maybe some old leftovers?
I am closing this with "cannot reproduce".
Thank you for a great module!
Comment #6
oscillator commented