You are here

function Markdown_Parser::detab in Markdown 5

Same name and namespace in other branches
  1. 6 markdown.php \Markdown_Parser::detab()
1 call to Markdown_Parser::detab()
Markdown_Parser::transform in ./markdown.php

File

./markdown.php, line 1578

Class

Markdown_Parser

Code

function detab($text) {

  #

  # Replace tabs with the appropriate amount of space.

  #

  # For each line we separate the line in blocks delemited by

  # tab characters. Then we reconstruct every line by adding the

  # appropriate number of space between each blocks.
  $text = preg_replace_callback('/^.*\\t.*$/m', array(
    &$this,
    '_detab_callback',
  ), $text);
  return $text;
}