Skip to content

Commit

Permalink
Commenting
Browse files Browse the repository at this point in the history
  • Loading branch information
personalizedrefrigerator committed Dec 17, 2024
1 parent 6b4b8ec commit c949c5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/turndown/src/commonmark-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,8 @@ function imageMarkdownFromNode(node, options = null) {
if (options.preserveImageTagsWithSize && (node.getAttribute('width') || node.getAttribute('height'))) {
let html = node.outerHTML;

// To prevent markup immediately after the image from being interpreted as HTML, a closing tag
// is sometimes necessary.
const needsClosingTag = () => {
const parent = node.parentElement;
if (!parent || parent.nodeName !== 'LI') return false;
Expand Down

0 comments on commit c949c5c

Please sign in to comment.