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

CommentFileSizeAuthor
#3 markdown-easy-table.png16.17 KBultimike

Comments

oscillator created an issue. See original summary.

oscillator’s picture

Issue summary: View changes
ultimike’s picture

Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new16.17 KB

@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):

| Name  | Age | Occupation |
|-------|-----|------------|
| Zhang | 25  | Engineer   |
| Li    | 30  | Designer   |
| Wang  | 28  | Product Manager |

5. The table rendered as expected:

Screenshot of a Markdown sample table rendered correctly.

What did I miss?

thanks,
-mike

oscillator’s picture

Thank 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!

oscillator’s picture

I 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!

oscillator’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.