You are here

protected function Markdown::detab in Express 8

* Replace tabs with the appropriate amount of spaces. * * 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. * *

Parameters

string $text: * @return string

1 call to Markdown::detab()
Markdown::transform in vendor/michelf/php-markdown/Michelf/Markdown.php
* Main function. Performs some preprocessing on the input text and pass * it through the document gamut. * * @api * *

File

vendor/michelf/php-markdown/Michelf/Markdown.php, line 1830

Class

Markdown
Markdown Parser Class

Namespace

Michelf

Code

protected function detab($text) {
  $text = preg_replace_callback('/^.*\\t.*$/m', array(
    $this,
    '_detab_callback',
  ), $text);
  return $text;
}