Module types

Module types 

Source
Expand description

Type definitions for halldyll-parser

This module contains all public types used throughout the parser:

  • Error types
  • Content types (text, headings, lists, tables, etc.)
  • Metadata types (OpenGraph, Twitter Cards, etc.)
  • Structured data types (JSON-LD, Microdata, RDFa)

Structs§

AlternateLink
Alternate language version (hreflang)
CodeBlock
An extracted code block
Heading
A heading element (h1-h6)
Image
An extracted image
Link
An extracted link
ListContent
An extracted list
ListItem
A list item (may contain nested content)
OpenGraph
OpenGraph metadata
PageMetadata
Complete page metadata
ParseStats
Parsing statistics
ParsedContent
Complete parsed content from an HTML document
ParserConfig
Configuration for the HTML parser
Quote
An extracted blockquote
RobotsMeta
Robots meta directives
StructuredData
Extracted structured data item
TableCell
A table cell
TableContent
An extracted table
TableRow
A table row
TextContent
Extracted text content with metadata
TwitterCard
Twitter Card metadata

Enums§

ImageLoading
Image loading strategy
LinkRel
Relationship types for links
LinkType
Type of link (internal vs external)
ListType
Type of list
ParserError
Errors that can occur during HTML parsing
StructuredDataFormat
Type of structured data

Functions§

clean_text
Clean text by removing control characters
normalize_whitespace
Normalize whitespace in text
truncate_text
Truncate text to max length with ellipsis

Type Aliases§

ParserResult
Result type for parser operations