stephenharris / WP-MarkDown

WP-MarkDown plug-in. Allows Markdown to be enabled in posts, comments and bbPress forums.
http://wordpress.org/extend/plugins/wp-markdown/
112 stars 19 forks source link

Markdown links not displaying within last <td> of a table #34

Open codemonkee opened 10 years ago

codemonkee commented 10 years ago

I was trying to figure out another issue with the same table - not sure if it is a limitation of the markdown parsing.

The following table when entered does not display the last set of links (18, 19) unless they are followed by some content or two spaces. Like wise links 15 & 16 do not exhibit this symptom.

<div>
<table>
  <tr><th>Chrome</th><th>Firefox</th><th>Safari</th><th>Opera</th></tr>
  <tr>
    <td markdown="1">[Xdebug Helper][14]</td>
    <td markdown="1">
        [Easy Xdebug][15]   
        [The easiest Xdebug][16]
    </td>
    <td markdown="1">[Xdebug Toggler][17]</td>
    <td markdown="1">
      [Xdebug Launcher][18]
      [Xdebug][19]
    </td>
  </tr>
</table>
</div>
stephenharris commented 10 years ago

I get this too. I found its enough to follow the last link with two spaces (one doesn't work). I've haven't had chance to look exactly where the problem is, but, unusually this a problem with Markdown -> HTML (for which the plug-in uses PHP Markdown Extra).

I'll take a look to see if there's a known issue, and update accordingly, before digging into the source given the discrepancy between a space and two spaces after the last link, it seems there is a bug in the parser somewhere...

stephenharris commented 10 years ago

In 1.5, tables are now supported. I'm not sure why the above doesn't work (perhaps its to do with Markdown inside HTML elements - which should be possible with markdown="1" - but heh). So stepping around, rather than solving the issue, the following works for me:

| Year      | Temperature (low) | Temperature (high) |
| --------- | ----------------- | ------------------ |
| [1900][1] | -10               | [25][1]            |
| [1910][1] | -15               | [30][1]            |
| [1920][1] | -10               | [32][1]            |

    [1]: http://google.com