Solar_Markdown::_explodeTags()

protected array Solar_Markdown::_explodeTags ( string $str )

Explodes source text into tags and text

Parameters

  • (string) $str: A string of HTML.

Returns

  • (array) The string exploded into tag and non-tag portions.

Description

Explodes source text into tags and text

Regular expression derived from the _tokenize() subroutine in Brad Choate's » MTRegex plugin.

From the original notes ...

Returns an array of the tokens comprising the input string. Each token is either a tag (possibly with nested, tags contained therein, such as <a href="<MTFoo>">, or a run of text between tags. Each element of the array is a two-element array; the first is either 'tag' or 'text'; the second is the actual value.



Local