Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 FIX: Newline not rendered in image alt attribute #157

Merged
merged 3 commits into from
Apr 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions markdown_it/port.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- package: markdown-it/markdown-it
version: 12.0.5
commit: 3740146fc9c92ea15fdc6a358137ec7b68f05f4b
date: Apr 14, 2021
version: 12.0.6
commit: df4607f1d4d4be7fdc32e71c04109aea8cc373fa
date: Apr 16, 2021
notes:
- Rename variables that use python built-in names, e.g.
- `max` -> `maximum`
Expand Down
2 changes: 2 additions & 0 deletions markdown_it/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ def renderInlineAsText(
elif token.type == "image":
assert token.children is not None
result += self.renderInlineAsText(token.children, options, env)
elif token.type == "softbreak":
result += "\n"

return result

Expand Down
9 changes: 9 additions & 0 deletions tests/test_port/fixtures/commonmark_extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,15 @@ baz</p>
</blockquote>
.

Newline in image description
.
There is a newline in this image ![here
it is](https://github.com/executablebooks/)
.
<p>There is a newline in this image <img src="https://github.com/executablebooks/" alt="here
it is" /></p>
.

Issue #772. Header rule should not interfere with html tags.
.
<!--
Expand Down