mirror of
https://github.com/markedjs/marked.git
synced 2026-11-30 16:48:05 +01:00
fix: keep hard line breaks in image alt text (#4187)
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ export class _TextRenderer<RendererOutput = string> {
|
||||
}
|
||||
|
||||
br(): RendererOutput {
|
||||
return '' as RendererOutput;
|
||||
return '\n' as RendererOutput;
|
||||
}
|
||||
|
||||
checkbox({ raw }: Tokens.Checkbox): RendererOutput {
|
||||
|
||||
@@ -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>
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
renderExact: true
|
||||
---
|
||||

|
||||
|
||||

|
||||
|
||||
![foo\
|
||||
bar][ref]
|
||||
|
||||
[ref]: c.png
|
||||
Reference in New Issue
Block a user