fix: improve regex for weight formatting in formatMeta function (#11640)
This commit is contained in:
parent
e0bb094e01
commit
d5da43bbf6
@ -52,7 +52,7 @@ function formatMeta (meta?: Meta): [React.ReactNode, React.ReactNode] | null {
|
||||
firstEmpty === -1
|
||||
? strings
|
||||
: strings.slice(0, firstEmpty)
|
||||
).join(' ').replace(/#(<weight>| <weight>).*<\/weight>/, '');
|
||||
).join(' ').replace(/# ?<weight>[^<]*<\/weight>/, '');
|
||||
const parts = splitParts(combined.replace(/\\/g, '').replace(/`/g, ''));
|
||||
|
||||
return [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user