I wrote a one javascript markdown editor. When I click twice the table, 2 tables are create. But I have some problem for that. That tables are merging. How to avoid this problem?
Input:
| A header | Another header |
| -------- | -------------- |
| First | row |
| Second | row |
| A header | Another header |
| -------- | -------------- |
| First | row |
| Second | row |
Output:
| A header | Another header |
|---|---|
| First | row |
| Second | row |
| A header | Another header |
| -------- | -------------- |
| First | row |
| Second | row |
Just add a blank line to separate them:
| A header | Another header |
| -------- | -------------- |
| First | row |
| Second | row |
| A header | Another header |
| -------- | -------------- |
| First | row |
| Second | row |