Solar_Markdown_Wiki_Filter::_tabsToSpaces()

protected string Solar_Markdown_Wiki_Filter::_tabsToSpaces ( string $text )

Replaces tabs with the appropriate number of spaces.

Inherited from Solar_Markdown_Plugin_Prefilter.

Parameters

  • (string) $text: A block of text with tabs.

Returns

  • (string) The same block of text, with tabs converted to spaces so that columns still line up.

Description

Replaces tabs with the appropriate number of spaces.

» http://www.mail-archive.com/macperl-anyperl@perl.org/msg00144.html

It will take into account the length of the string before the tab starting from the start of the string, from the previous newline, or from the last replaced tab; and pad with 1 to 4 spaces so the string length becomes the next multiple of 4.



Local