DEV Community

Cover image for My converter returned 4 of 16 tabs and said nothing
Wei Bin
Wei Bin

Posted on

My converter returned 4 of 16 tabs and said nothing

Last week a user left a comment on one of my posts that stopped me cold. He'd run a documentation page through Page2MD, the web-to-Markdown converter I run, and the output looked fine. Clean Markdown, right headings, plausible length. It was also missing most of the page.

The page was a Docusaurus docs page with tabbed content — 16 tab panels, the kind where you click "npm / yarn / pnpm" or "Python / JavaScript / Go" and the code block swaps. My converter returned the content of the default tab and nothing else. Four panels' worth of material out of sixteen. HTTP 200, no warning, no marker that anything was missing.

Why this failure mode is the worst one

A hard error is honest. An empty result is honest. A partial result that looks complete is a lie your pipeline tells downstream.

This user was feeding converted docs into a RAG system. Nothing in his pipeline would ever flag the gap — the chunking worked, the embeddings worked, the answers just quietly never contained the content that lived in the other twelve tabs. He only caught it because he happened to know the original page well enough to notice what wasn't there.

Most users won't. That's the part that bothered me. For every person who writes in, there could be others who built on incomplete output and never knew.

What I changed the same day

Two things, in order of importance:

  1. Extract every tab panel, not the visible one. Tabbed content is in the DOM; a static extraction pass was only taking the active panel. Now all panels are collected and labeled with their tab names, so the Markdown shows which variant each block belongs to.

  2. Report completeness in the response. The API now returns how many structured sections it found versus how many it returned, and flags when a result may be partial. If a page has tabs, accordions, or paginated sections, the caller can see the counts and decide whether to trust the output. A converter that can't say "I might have missed something" shouldn't be in anyone's pipeline.

I also added that exact docs page to my regression set — real, messy, tabbed documentation, not a tidy test fixture. Every change to the extractor now runs against it. Test fixtures you write yourself only ever contain the problems you already imagined.

The rule I'm keeping

Any tool that extracts, converts, or summarizes has the same trap available: succeed partially, report success fully. Error rates won't catch it. Uptime won't catch it. The only thing that catches it is comparing output against the source, section by section, on real-world pages.

If you maintain a tool like this, go find a page with tabs and run it. Count what comes back. I thought my converter was done months ago. It took one reader about ten minutes to prove it wasn't.


Page2MD is at https://newkwlab.com/page2md/?utm_source=devto&utm_medium=referral&utm_campaign=2026-12-02-tabbed — the tabbed-page fix described here shipped on Nov 28.

Top comments (1)

Collapse
 
agentsearchhq profile image
AgentSearch •

The completeness count is the right fix. A few more places I've seen the same "200, looks complete, isn't" failure:

  • Accordions and "show more" sections that fetch their body on click. Unlike your tabs, that content isn't in the DOM at all until someone expands it, so collecting every panel still comes back empty for those.
  • Pagination inside a single doc page (API reference tables split into pages of 25 rows).
  • Content in <template> or <noscript> tags, which some extractors drop as non-content.

One cheap regression check that has caught a lot for me: count the headings (h2/h3) in the raw HTML and in the output. If the output has fewer, flag it as possibly partial even when the length looks reasonable.