[wp-hackers] Textile maintainer?
Kyle VanderBeek
kylev-wp at kylev.com
Wed Mar 9 21:30:26 GMT 2005
On Wed, Mar 09, 2005 at 01:23:13PM -0800, Kyle VanderBeek wrote:
> The textile1.php plugin seems to me to be at least somewhat broken. For
> example, it strips all leading space from <pre> sections. Eek.
Bah, to reply to my own post, that was an obvious bug. Patch attached,
please apply.
Trimming trailing spaces is sometimes ok, but leading spaces sometimes
have meaning.
--
kylev at kylev.com
Some people have a way with words, while others... erm... thingy.
-------------- next part --------------
Index: wp-content/plugins/textile1.php
===================================================================
--- wp-content/plugins/textile1.php (revision 2423)
+++ wp-content/plugins/textile1.php (working copy)
@@ -51,7 +51,7 @@
*/
- function textile($text) {
+function textile($text) {
$text = stripslashes($text);
$text = preg_replace("/&(?![#a-zA-Z0-9]+;)/","x%x%",$text);
@@ -70,7 +70,7 @@
$text = preg_split("/\n/",$text);
foreach($text as $line){
- $line = trim($line);
+ $line = rtrim($line);
$lineout[] = $line;
}
More information about the wp-hackers
mailing list