From cf7a547af45557b64dd9137c42049fea0443690f Mon Sep 17 00:00:00 2001 From: Michel Fortin Date: Tue, 28 Aug 2007 17:35:46 -0400 Subject: [PATCH] Clean up of function detab. --- markdown.php | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/markdown.php b/markdown.php index deacba6..ab636ba 100644 --- a/markdown.php +++ b/markdown.php @@ -1407,25 +1407,7 @@ class Markdown_Parser { $text = preg_replace_callback('/^.*\t.*$/m', array(&$this, '_detab_callback'), $text); - -// $strlen = $this->utf8_strlen; # strlen function for UTF-8. -// $lines = explode("\n", $text); -// $text = ""; -// -// foreach ($lines as $line) { -// # Split in blocks. -// $blocks = explode("\t", $line); -// # Add each blocks to the line. -// $line = $blocks[0]; -// unset($blocks[0]); # Do not add first block twice. -// foreach ($blocks as $block) { -// # Calculate amount of space, insert spaces, insert block. -// $amount = $this->tab_width - -// $strlen($line, 'UTF-8') % $this->tab_width; -// $line .= str_repeat(" ", $amount) . $block; -// } -// $text .= "$line\n"; -// } + return $text; } function _detab_callback($matches) {