fix: add eslint-disable for prefer-create-el false positive on DOMParser document

This commit is contained in:
@gapmiss 2026-07-18 16:06:53 -05:00
parent abd4235867
commit ce476bb678

View file

@ -17,10 +17,12 @@ function replaceVideoDivs(html: string, downloadedUrls: Set<string>): string {
if (id.length !== 42) continue;
const videoId = id.replace('media-', '');
const videoUrl = `https://substack.com/api/v1/video/upload/${videoId}/src`;
// eslint-disable-next-line obsidianmd/prefer-create-el -- DOMParser document, not Obsidian DOM
const p = doc.createElement('p');
if (downloadedUrls.has(videoUrl)) {
p.textContent = `VIDEOEMBED${videoId}ENDVIDEO`;
} else {
// eslint-disable-next-line obsidianmd/prefer-create-el -- DOMParser document, not Obsidian DOM
const a = doc.createElement('a');
a.href = videoUrl;
a.textContent = 'Video';