_MarkdownExtra_TmpImpl::doDefLists PHP 메소드

doDefLists() 보호된 메소드

protected doDefLists ( $text )
    protected function doDefLists($text)
    {
        #
        # Form HTML definition lists.
        #
        $less_than_tab = $this->tab_width - 1;
        # Re-usable pattern to match any entire dl list:
        $whole_list_re = '(?>
			(								# $1 = whole list
			  (								# $2
				[ ]{0,' . $less_than_tab . '}
				((?>.*\\S.*\\n)+)				# $3 = defined term
				\\n?
				[ ]{0,' . $less_than_tab . '}:[ ]+ # colon starting definition
			  )
			  (?s:.+?)
			  (								# $4
				  \\z
				|
				  \\n{2,}
				  (?=\\S)
				  (?!						# Negative lookahead for another term
					[ ]{0,' . $less_than_tab . '}
					(?: \\S.*\\n )+?			# defined term
					\\n?
					[ ]{0,' . $less_than_tab . '}:[ ]+ # colon starting definition
				  )
				  (?!						# Negative lookahead for another definition
					[ ]{0,' . $less_than_tab . '}:[ ]+ # colon starting definition
				  )
			  )
			)
		)';
        // mx
        $text = preg_replace_callback('{
				(?>\\A\\n?|(?<=\\n\\n))
				' . $whole_list_re . '
			}mx', array($this, '_doDefLists_callback'), $text);
        return $text;
    }