mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Remove trailing whitespace
This commit is contained in:
parent
c5267b42fd
commit
37b0d3a1e6
71 changed files with 806 additions and 806 deletions
|
|
@ -12,7 +12,7 @@ class tagModel extends tag
|
|||
*/
|
||||
protected static $_separator_list = null;
|
||||
protected static $_separator_regexp = null;
|
||||
|
||||
|
||||
/**
|
||||
* Generate and cache separator list and regexp.
|
||||
*/
|
||||
|
|
@ -27,7 +27,7 @@ class tagModel extends tag
|
|||
{
|
||||
self::$_separator_list = ['comma', 'hash'];
|
||||
}
|
||||
|
||||
|
||||
$regexp = '/[';
|
||||
$regexp_map = [
|
||||
'comma' => ',',
|
||||
|
|
@ -39,13 +39,13 @@ class tagModel extends tag
|
|||
$regexp .= $regexp_map[$separator];
|
||||
}
|
||||
$regexp .= ']+/';
|
||||
|
||||
|
||||
self::$_separator_regexp = $regexp;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Split a string of tags into an array.
|
||||
*
|
||||
*
|
||||
* @param string $str
|
||||
* @return array
|
||||
*/
|
||||
|
|
@ -55,14 +55,14 @@ class tagModel extends tag
|
|||
{
|
||||
self::_generateSeparatorConfig();
|
||||
}
|
||||
|
||||
|
||||
// Clean up the input string.
|
||||
$str = trim(utf8_normalize_spaces(utf8_clean($str)));
|
||||
if ($str === '')
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
// Split the input string and collect non-empty fragments.
|
||||
$fragments = preg_split(self::$_separator_regexp, $str, -1, PREG_SPLIT_NO_EMPTY);
|
||||
$tags = [];
|
||||
|
|
@ -74,11 +74,11 @@ class tagModel extends tag
|
|||
$tags[strtolower($fragment)] = $fragment;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Return a list of valid fragments with no duplicates.
|
||||
return array_values(array_unique($tags));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Imported Tag List
|
||||
* Many of the specified module in order to extract the number of tags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue