BBCode::Internal_CleanupWSByEatingInput( $pattern )
Contents
Description Description
Source Source
File: includes/admin/parser.php
function Internal_CleanupWSByEatingInput($pattern) { if (strlen($pattern) <= 0) return; foreach (str_split($pattern) as $char) { switch ($char) { case 's': $token_type = $this->lexer->NextToken(); while ($token_type == BBCODE_WS) { $token_type = $this->lexer->NextToken(); } $this->lexer->UngetToken(); break; case 'n': $token_type = $this->lexer->NextToken(); if ($token_type != BBCODE_NL) $this->lexer->UngetToken(); break; case 'a': $token_type = $this->lexer->NextToken(); while ($token_type == BBCODE_WS || $token_type == BBCODE_NL) { $token_type = $this->lexer->NextToken(); } $this->lexer->UngetToken(); break; } } }