Skip to content

Commit

Permalink
Меняет на регулярку
Browse files Browse the repository at this point in the history
Co-authored-by: Vadim Makeev <[email protected]>
  • Loading branch information
monochromer and pepelsbey authored Oct 6, 2023
1 parent fbf1722 commit 1e84882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ module.exports = function(config) {

const { document } = parseHTML(content);
const images = Array.from(document.querySelectorAll('.article__content img'))
.filter((image) => !image.src.startsWith('http://') && !image.src.startsWith('https://'));
.filter((image) => !image.src.match(/^https?/));

if (images.length === 0) {
return content;
Expand Down

0 comments on commit 1e84882

Please sign in to comment.