Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attr_list extension doesn't work well with tables extension #891

Closed
pkubiak opened this issue Dec 30, 2019 · 1 comment
Closed

attr_list extension doesn't work well with tables extension #891

pkubiak opened this issue Dec 30, 2019 · 1 comment

Comments

@pkubiak
Copy link

pkubiak commented Dec 30, 2019

Hi,
I have tried to add some styles to table created with tables extension using attr_list extension, but it works quite strange. For markdown:

| column 1 | column 2 |
|----------|----------|
| value 1 {: .text-primary} | value 2 {: .text-danger }|
{: .text-success }

it creates new empty row with cell of given class (with extensions=['markdown.extensions.extra']):

<table>
<thead>
<tr>
<th>column 1</th>
<th>column 2</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-primary">value 1 </td>
<td class="text-danger">value 2 </td>
</tr>
<tr>
<td class="text-success"></td>
<td></td>
</tr>
</tbody>
</table>

instead of setting class of whole table what I would expect:

<table class="text-success">
<thead>
<tr>
<th>column 1</th>
<th>column 2</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-primary">value 1 </td>
<td class="text-danger">value 2 </td>
</tr>
</tbody>
</table>

Is it a correct behavior of attr_list extension? or is there same workaround to style whole table?

>>> markdown.__version__
'3.1.1'
@waylan
Copy link
Member

waylan commented Dec 30, 2019

This is a duplicate of #312.

@waylan waylan closed this as completed Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants