textile / php-textile

Textile markup language parser for PHP
https://textile-lang.com
Other
216 stars 44 forks source link

[4.2.1] links in table cells bug.. #88

Closed jdlx closed 11 years ago

jdlx commented 11 years ago

The following markup - a link in a table cell without whitespace around the link - used to work in 4.2.0 and earlier, but doesn't in 4.2.1:

|"google":http://google.de|

will result in a unparsed link:

<table>
  <tr>
    <td>&#8220;google&#8221;:http://google.de</td>
  </tr>
</table>
netcarver commented 11 years ago

Thanks for the report jdlx.

It is due to a bugfix that removed a troublesome graf() of cell contents from the table handling code. It seems that the removed call to graf() had the effect of making links in cases like this.

Will think on this one but for now, let me know if this is a particular issue for you or if it's low priority.

jdlx commented 11 years ago

Not too high for me personally since i allready patched the code where it bit me.. so don't break your back on this one ;) (However can't tell how common such usage for others might be.. the whitespace workaround is simple, but only once one is aware of the prob..)

netcarver commented 11 years ago

I've just pushed a proof-of-concept branch with a re-written link engine (unoptimized at the moment.) Could you try it out and see what link problems it solves or others it introduces for you?

Thanks in advance.

jdlx commented 11 years ago

Dear Steve.. could you provide your testing script? We do have a unit test addon in Redaxo5 (none in Redaxo 4 though), however i'd still have to write a matching plugin for textile.. which right now is out of scope for me due to spare time restrictions.. ;)

netcarver commented 11 years ago

Actually I intend totally re-working the test harness so that it is compatible with the testing fixtures used by Redcloth. I'll update the project when I've done that and let you know.

jdlx commented 11 years ago

thx.. though if you do have something PHP based in the meantime plz let me know.. pm if you wish. Ruby ain't my table.. ;)

netcarver commented 11 years ago

Hi jdlx, what's your email address?

jdlx commented 11 years ago

https://github.com/gn2netwerk/rexseo/blob/master/config.inc.php#L8 thx, jan

netcarver commented 11 years ago

You (should) have e-mail.

netcarver commented 11 years ago

Fix is in the "dev branch":https://github.com/netcarver/textile/wiki/PHP-Textile-Changelog and will be in the next release.