httk.serve.web.widgets.extraction ================================= .. py:module:: httk.serve.web.widgets.extraction .. autoapi-nested-parse:: Renderer-aware extraction of literal-only ``widget(...)`` invocations. Functions --------- .. autoapisummary:: httk.serve.web.widgets.extraction.parse_widget_invocation httk.serve.web.widgets.extraction.placement_for httk.serve.web.widgets.extraction.markdown_source httk.serve.web.widgets.extraction.html_source Module Contents --------------- .. py:function:: parse_widget_invocation(text: str, *, source_path: pathlib.Path, line: int, column: int) -> tuple[str, dict[str, object]] Parse one invocation without evaluation or general Python expressions. .. py:function:: placement_for(text: str, *, source_path: pathlib.Path, line: int, column: int, index: int) -> httk.serve.web.renderers.base.WidgetPlacement .. py:function:: markdown_source(source: str, source_path: pathlib.Path, *, line_offset: int = 0) -> tuple[str, tuple[httk.serve.web.renderers.base.WidgetPlacement, Ellipsis]] Replace only standalone Markdown paragraphs, excluding code blocks. .. py:function:: html_source(source: str, source_path: pathlib.Path) -> tuple[str, tuple[httk.serve.web.renderers.base.WidgetPlacement, Ellipsis]] Extract complete HTML text blocks while deliberately skipping code-like tags.