Replace "range" indicators with mathematical tilde in LCSC provider (#989)

* Replace "range" indicators with mathematical tilde symbols in LCSC provider

* Improve comment
This commit is contained in:
d-buchmann 2025-09-06 19:43:50 +02:00 committed by GitHub
parent 411ac500ba
commit 4e9e82d9f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -165,6 +165,9 @@ class LCSCProvider implements InfoProviderInterface
if ($field === null) { if ($field === null) {
return null; return null;
} }
// Replace "range" indicators with mathematical tilde symbols
// so they don't get rendered as strikethrough by Markdown
$field = preg_replace("/~/", "\u{223c}", $field);
return strip_tags($field); return strip_tags($field);
} }