fix: keep hard line breaks in image alt text (#4187)

This commit is contained in:
Lim Jooyoung
2026-11-08 11:07:15 -07:00
committed by GitHub
parent ba50aa9563
commit ed54c541ef
3 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ export class _TextRenderer<RendererOutput = string> {
}
br(): RendererOutput {
return '' as RendererOutput;
return '\n' as RendererOutput;
}
checkbox({ raw }: Tokens.Checkbox): RendererOutput {
+6
View File
@@ -0,0 +1,6 @@
<p><img src="a.png" alt="foo
bar"></p>
<p><img src="b.png" alt="foo
bar"></p>
<p><img src="c.png" alt="foo
bar"></p>
+13
View File
@@ -0,0 +1,13 @@
---
renderExact: true
---
![foo\
bar](a.png)
![foo
bar](b.png)
![foo\
bar][ref]
[ref]: c.png