Skip to content

Commit

Permalink
add <picture></picture> and add test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevending1st committed Jun 17, 2021
1 parent 7e2ec39 commit c25fd01
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 33 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45312,11 +45312,12 @@ exports.HTMLtoMarkdown = (html) =>
return reject(Err_DOMWrong);

// full image
let fullImage = $('.post-full-image > img') || '',
let fullImage = $('.post-full-image > picture > img') || '',
fullImageURL;
// Is there a full image
if (fullImage) {
fullImageURL = fullImage.attr('src');

// Whether the src of the full image is empty
if (!fullImageURL) return reject(Err_DOMWrong);
else {
Expand Down
Loading

0 comments on commit c25fd01

Please sign in to comment.