web2gmi: address edge case with challenging pages
1 files changed, 3 insertions(+), 0 deletions(-) M web2gmi.js
M web2gmi.js => web2gmi.js +3 -0
@@ 31,6 31,9 @@ const convert = (dom, title) => { .page a, .page ul, .page ol `)]; + if (elements.length === 0) { + return "Unable to process this URL\n"; + } if (elements[0].tagName.toLowerCase() !== "h1") { output += `# ${title}\n\n`; }