Closed valtlai closed 3 years ago
I got it to apply the class to the <table>
element by moving it to a seperate paragraph:
| Foo | Baz |
| ----- | ----- |
| sin | cos |
{.lorem}
Looks like markdown-it treats the last line as part of the table even when it doesn't contain any pipes.
@schl3ck You’re right. That new behavior in markdown-it v12 is correct according to GitHub Flavored Markdown Spec.
Opened PR #114 to update markdown-it to v12 and a test to use a blank line after the table.
Markdown-it v12 was just released. We can’t just bump the markdown-it version because tables don’t work correctly without code changes. I’m not sure if markdown-it-attrs or markdown-it itself should be updated to fix the issue.
Markdown-it versions: 12.0.0
Example input:
Current output:
Expected output: