-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Desktop: Fixes #11382: Rich Text Editor: Fix resized images in lists …
…break sub-list items (#11532)
- Loading branch information
1 parent
9b50539
commit c197d89
Showing
3 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
packages/app-cli/tests/html_to_md/image_preserve_size_in_lists.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<ul> | ||
<li> | ||
<img src=":/0123456789abcdef0123456789abcdef" width="10" height="11"/> | ||
<ul> | ||
<li>HTML images just before a sublist should have a closing <img> tag added.</li> | ||
<li>Otherwise, when rendered to Markdown again, the subsequent list items will be rendered as HTML.</li> | ||
</ul> | ||
</li> | ||
<li> | ||
<img src=":/0123456789abcdef0123456789abcdef" width="10" height="11"/> | ||
<br/> | ||
<strong>A closing tag is also necessary if the image is followed by content on a new line.</strong> | ||
</li> | ||
<li> | ||
<img src=":/0123456789abcdef0123456789abcdef"/> | ||
<ul> | ||
<li>Similar logic isn't necessary for images converted to Markdown.</li> | ||
</ul> | ||
</li> | ||
<li> | ||
<img src=":/0123456789abcdef0123456789abcdef" width="10" height="11"/> | ||
</li> | ||
<li>It also isn't necessary if the next item is at the same level as the image...</li> | ||
<li> | ||
...or if the image has text just before it. | ||
<img src=":/0123456789abcdef0123456789abcdef" width="10" height="11"/> | ||
<ul> | ||
<li> | ||
See <a href="https://github.com/laurent22/joplin/issues/11382">this issue</a> for details. | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> |
11 changes: 11 additions & 0 deletions
11
packages/app-cli/tests/html_to_md/image_preserve_size_in_lists.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- <img src=":/0123456789abcdef0123456789abcdef" width="10" height="11"></img> | ||
- HTML images just before a sublist should have a closing <img> tag added. | ||
- Otherwise, when rendered to Markdown again, the subsequent list items will be rendered as HTML. | ||
- <img src=":/0123456789abcdef0123456789abcdef" width="10" height="11"></img> | ||
**A closing tag is also necessary if the image is followed by content on a new line.** | ||
- ![](:/0123456789abcdef0123456789abcdef) | ||
- Similar logic isn't necessary for images converted to Markdown. | ||
- <img src=":/0123456789abcdef0123456789abcdef" width="10" height="11"> | ||
- It also isn't necessary if the next item is at the same level as the image... | ||
- ...or if the image has text just before it. <img src=":/0123456789abcdef0123456789abcdef" width="10" height="11"> | ||
- See [this issue](https://github.com/laurent22/joplin/issues/11382) for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters