Skip to content

src/dazzle_back/runtime/richtext_processor.py

Generated: 2026-03-30T04:38:47.991531+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Rich text processing for DNR.

Provides markdown processing, HTML sanitization, and inline image handling.

Key Exports

  • RichTextProcessingError
  • MarkdownProcessor
  • HTMLProcessor
  • RichTextService
  • is_available
  • render_html
  • process_inline_images
  • extract_text
  • truncate
  • clean
  • extract_text
  • render_html
  • process_content
  • extract_text
  • preview
  • _Sanitizer
  • replace_match
  • handle_starttag
  • handle_endtag
  • handle_data

Dependencies

Imports

  • __future__.annotations
  • re
  • typing.TYPE_CHECKING
  • file_storage.StorageBackend
  • html
  • html.parser.HTMLParser
  • markdown
  • markdown
  • bleach
  • html
  • base64
  • io.BytesIO
  • uuid.uuid4

Event Interactions

None detected.

Invariants and Assumptions

  • Assert: self.storage is not None # checked at method entry

Tests

  • tests/unit/test_richtext_processor.py
  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_test_routes.py
  • tests/unit/test_runtime_services.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.