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

End tags incorrectly placed when list is in a table cell #114

Open
andrewlayman opened this issue Nov 20, 2022 · 1 comment
Open

End tags incorrectly placed when list is in a table cell #114

andrewlayman opened this issue Nov 20, 2022 · 1 comment

Comments

@andrewlayman
Copy link

andrewlayman commented Nov 20, 2022

For a table such as this, when converted to HTML, the closing </li> and </ul> tags are output just prior to the end of the cell, (/td>), rather than at the end of the list. (This causes me about 30 minutes of work each week fixing the formatting of large tables of lists.)

image

Expected output

<!-- Output copied to clipboard! -->

<!-- Yay, no errors, warnings, or alerts! -->


<table>
  <tr>
   <td>
<h3>Column 1, row 1</h3>


   </td>
   <td>
<h3>Heading A</h3>


<ul>

<li>A

<li>B

<li>C
</li>
</ul>

<h3>Heading B</h3>


<ul>

<li>D

<li>E

<li>F
</li>
</ul>
   </td>
  </tr>
  <tr>
   <td>
<h3>Column 1, row 1</h3>


   </td>
   <td>
<h3>Heading A</h3>


<ul>

<li>A 
<ul>
 
<li>A1
 
<li>A2
</li> 
</ul>

<li>B

<li>C
</li>
</ul>
<h3>Heading B</h3>


<ul>

<li>D

<li>E

<li>F
</li>
</ul>
   </td>
  </tr>
</table>

Actual output:

<!-- Output copied to clipboard! -->

<!-- Yay, no errors, warnings, or alerts! -->


<table>
  <tr>
   <td>
<h3>Column 1, row 1</h3>


   </td>
   <td>
<h3>Heading A</h3>


<ul>

<li>A

<li>B

<li>C

<h3>Heading B</h3>


<ul>

<li>D

<li>E

<li>F
</li>
</ul>
</li>
</ul>
   </td>
  </tr>
  <tr>
   <td>
<h3>Column 1, row 1</h3>


   </td>
   <td>
<h3>Heading A</h3>


<ul>

<li>A 
<ul>
 
<li>A1
 
<li>A2
</li> 
</ul>

<li>B

<li>C

<h3>Heading B</h3>


<ul>

<li>D

<li>E

<li>F
</li>
</ul>
</li>
</ul>
   </td>
  </tr>
</table>

If rendered correctly, this would look like

image

but, instead, it looks like

image

@evbacher
Copy link
Owner

evbacher commented Feb 8, 2023

This is a known bug with HTML lists (#15). Markdown is the primary target for this add-on, but we do use HTML for tables, so I'd like to fix it when I get some time. I've tinkered with it a few times and broken a bunch of other stuff :( But I'll try again -- no promises on a delivery date though.

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