Skip to content

Commit 4e9e82d

Browse files
authored
Replace "range" indicators with mathematical tilde in LCSC provider (#989)
* Replace "range" indicators with mathematical tilde symbols in LCSC provider * Improve comment
1 parent 411ac50 commit 4e9e82d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Services/InfoProviderSystem/Providers/LCSCProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ private function sanitizeField(?string $field): ?string
165165
if ($field === null) {
166166
return null;
167167
}
168+
// Replace "range" indicators with mathematical tilde symbols
169+
// so they don't get rendered as strikethrough by Markdown
170+
$field = preg_replace("/~/", "\u{223c}", $field);
168171

169172
return strip_tags($field);
170173
}

0 commit comments

Comments
 (0)