fix: replace old-style <br> tags to fix Mermaid rendering issues (#13792)
parent
58a74fe1fb
commit
49d0acd188
@ -0,0 +1,8 @@
|
|||||||
|
import { cleanUpSvgCode } from './utils'
|
||||||
|
|
||||||
|
describe('cleanUpSvgCode', () => {
|
||||||
|
it('replaces old-style <br> tags with the new style', () => {
|
||||||
|
const result = cleanUpSvgCode('<br>test<br>')
|
||||||
|
expect(result).toEqual('<br/>test<br/>')
|
||||||
|
})
|
||||||
|
})
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
export function cleanUpSvgCode(svgCode: string): string {
|
||||||
|
return svgCode.replaceAll('<br>', '<br/>')
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue