gomarkdown / markdown

markdown parser and HTML renderer for Go
Other
1.36k stars 171 forks source link

CodeBlock in table brokes #266

Closed ivanspasov99 closed 1 year ago

ivanspasov99 commented 1 year ago

If we have the following snippet of code:

    <table>
    <thead><tr><th>Bad</th><th>Good</th></tr></thead>
    <tbody>
    <tr><td>

    ```go
    import "a"
    import "b"
</td><td>

```go
import (
"a"
"b"
)
```

</td></tr>
</tbody></table>


The library did not resolve the CodeBlock in the table. It stays as it was written

![Screenshot 2022-10-11 at 11 54 54](https://user-images.githubusercontent.com/23458270/195045300-052cd064-3516-44ae-aa9f-78d38d6ad01b.png)
miekg commented 1 year ago

you can't have block level elements (such as a codeblock) in a table, this is WAI