Clean up of function detab.
This commit is contained in:
parent
e2b2ddc026
commit
cf7a547af4
1 changed files with 1 additions and 19 deletions
20
markdown.php
20
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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue