Improve description tag parsing

dev
gravel 2 years ago
parent 5ffb11013e
commit 7f32367504
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -141,7 +141,7 @@
/** /**
* Regular expression matching tags specified in the Community description. * Regular expression matching tags specified in the Community description.
*/ */
private const DESCRIPTION_TAGS_SPECIFICATION = '/(#[^#()@., ]+(?:,?\s*|\s+|$))+\s*$/'; private const DESCRIPTION_TAGS_SPECIFICATION = '/(#[^#()@., ]+(?:,?\s*|\s+|$))+\s*.?$/';
/** /**
@ -186,6 +186,7 @@
// Trim tags from description. // Trim tags from description.
$this->description = substr($this->description, 0, strpos($this->description, $tag_specification)); $this->description = substr($this->description, 0, strpos($this->description, $tag_specification));
$this->description = preg_replace('/\s*tags:\s*$/i', '', $this->description);
} }
/** /**

Loading…
Cancel
Save