do not error on empty md link
This commit is contained in:
parent
6cc7288e99
commit
fcd5c6cdf3
@ -62,7 +62,7 @@ export default function Text ({ nofollow, children }) {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
a: ({ node, href, children, ...props }) => {
|
a: ({ node, href, children, ...props }) => {
|
||||||
children = children.map(e => typeof e === 'string'
|
children = children?.map(e => typeof e === 'string'
|
||||||
? reactStringReplace(e, /:high\[([^\]]+)\]/g, (match, i) => {
|
? reactStringReplace(e, /:high\[([^\]]+)\]/g, (match, i) => {
|
||||||
return <mark key={`mark-${match}-${i}`}>{match}</mark>
|
return <mark key={`mark-${match}-${i}`}>{match}</mark>
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user