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