One edge case for extract_title is an H1-looking line inside a fenced code example. A document can begin with a shell or Markdown sample containing a line that starts with # before its actual title; the current scan will treat that example as the document heading.
A fixture with a fenced block followed by the real H1 would make that boundary explicit. Tracking fenced regions would be a small extension before adopting a full parser, and it would keep the human-readable title reliable when those source paths later appear as citations or retrieval labels.
Ahmet Özel
AI Engineer. Computer Vision, RAG and LLM agents.
One edge case for extract_title is an H1-looking line inside a fenced code example. A document can begin with a shell or Markdown sample containing a line that starts with # before its actual title; the current scan will treat that example as the document heading.
A fixture with a fenced block followed by the real H1 would make that boundary explicit. Tracking fenced regions would be a small extension before adopting a full parser, and it would keep the human-readable title reliable when those source paths later appear as citations or retrieval labels.