Add ingestHtml and ingestMarkdown with ADR-0003 pageless offset semantics, PDF intrinsic metadata extraction with caller-wins merge (WP-0003), and citation recovery primitives including re-ingest reconcile, local quote search, and pluggable discovery hooks (ADR-0004). Mark all three workplans finished with contract tests (80 passing).
42 lines
No EOL
964 B
TypeScript
42 lines
No EOL
964 B
TypeScript
/**
|
|
* Inline HTML/Markdown fixtures for contract tests (ADR-0003).
|
|
*
|
|
* Unlike the PDF corpus (ADR-0002), these are small synthetic documents with
|
|
* no PII and are owned by this repo.
|
|
*/
|
|
|
|
export interface TextFixture {
|
|
readonly id: string;
|
|
readonly knownGoodQuote: string;
|
|
}
|
|
|
|
export const HTML_FIXTURE = `<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Fixture Title</title>
|
|
<style>.hidden { display: none; }</style>
|
|
</head>
|
|
<body>
|
|
<h1>Hello World</h1>
|
|
<p>Known good quote for HTML ingest testing.</p>
|
|
<script>alert("removed")</script>
|
|
</body>
|
|
</html>`;
|
|
|
|
export const MARKDOWN_FIXTURE = `# Hello World
|
|
|
|
Known good quote for Markdown ingest testing.
|
|
|
|
**bold** and _italic_ text.
|
|
`;
|
|
|
|
export const TEXT_FIXTURES: readonly TextFixture[] = [
|
|
{
|
|
id: "html-basic",
|
|
knownGoodQuote: "Known good quote for HTML ingest testing.",
|
|
},
|
|
{
|
|
id: "markdown-basic",
|
|
knownGoodQuote: "Known good quote for Markdown ingest testing.",
|
|
},
|
|
]; |