diff --git a/views/htmx.py b/views/htmx.py index 6353638..b3a68a0 100644 --- a/views/htmx.py +++ b/views/htmx.py @@ -18,6 +18,7 @@ from __future__ import annotations +import asyncio import datetime import json from typing import TYPE_CHECKING, Any, cast @@ -46,26 +47,36 @@ class HTMXView(starlette_plus.View, prefix="htmx"): def __init__(self, app: Application) -> None: self.app: Application = app - def highlight_code(self, filename: str, content: str, *, index: int, raw_url: str, annotation: str) -> str: - filename = bleach.clean(filename, attributes=[], tags=[]) - filename = "_".join(filename.splitlines()) - - content = bleach.clean(content.replace("❌ {annotation}' if annotation else "" - - return f""" -
{content}
- {content}
+