jeffreytse / jekyll-spaceship

🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
MIT License
605 stars 63 forks source link

Spaceship breaks nested tables in very specific circumstance. #97

Open vincerubinetti opened 3 months ago

vincerubinetti commented 3 months ago

Here's the code that causes the issue:

<table>
  <tr>
    <td>test</td>
    <td>test</td>
  </tr>
  <tr>
    <td>test</td>
    <td>
      <span>test</span>

      <table>
        <tr>
          <td>test</td>
          <td>test</td>
          <td>test</td>
        </tr>
      </table>
    </td>
  </tr>
</table>

The result:

Screenshot 2024-03-25 at 5 47 22 PM

If I wrap the nested <span> and <table> in a single <div>, it works as expected:

Screenshot 2024-03-25 at 5 48 51 PM

Initially I thought this must've been an issue with Jekyll's markdown parsers. See these issues for more information and more cases of odd/wrong behavior:

https://github.com/gettalong/kramdown/issues/803 https://github.com/kramdown/parser-gfm/issues/39

But then I tested those gems directly, and they didn't produce the problems. Eventually I narrowed down the problem to just jekyll-spaceship. If I have it on, this breaks.

Here's a minimal reproducible example. If you comment out the spaceship plugin in the gemfile, it works.

minimal-reproduction.zip