Skip to content

Commit

Permalink
Update HLJS and Include PlainText language. (#56)
Browse files Browse the repository at this point in the history
* Update HLJS and Include PlainText language.

* Fix to json loads

* Fix Pyright ignoring type ignore.
  • Loading branch information
EvieePy authored Jul 31, 2024
1 parent 02a2c45 commit bed0a68
Show file tree
Hide file tree
Showing 4 changed files with 522 additions and 217 deletions.
2 changes: 1 addition & 1 deletion views/htmx.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ async def htmx_save(self, request: starlette_plus.Request) -> starlette_plus.Res
)

if resp := validate_paste(data):
json_: dict[str, Any] = json.loads(resp.body)
json_: dict[str, Any] = json.loads(resp.body) # type: ignore Can only be memoryview when specifically used.
return starlette_plus.HTMLResponse(
f"""<span id="errorResponse">{resp.status_code}: {json_["error"]}</span>""",
headers=error_headers,
Expand Down
2 changes: 1 addition & 1 deletion web/password.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!-- <link rel="preload" href="static/packages/highlight.min.js" as="script"> -->
<!-- <link rel="preload" href="static/packages/highlight-ln.min.js" as="script"> -->
<script src="/static/packages/htmx.min.js"></script>
<script src="/static/packages/highlight.min.js"></script>
<script src="/static/packages/highlight.min.js?v=2"></script>

<!-- SCRIPTS -->
<script src="/static/scripts/initialTheme.js?v=1"></script>
Expand Down
2 changes: 1 addition & 1 deletion web/paste.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script src="/static/packages/htmx.min.js"></script>
<!-- <link rel="preload" href="static/packages/highlight.min.js" as="script"> -->
<!-- <link rel="preload" href="static/packages/highlight-ln.min.js" as="script"> -->
<script src="/static/packages/highlight.min.js"></script>
<script src="/static/packages/highlight.min.js?v=2"></script>

<!-- SCRIPTS -->
<script src="/static/scripts/initialTheme.js?v=1"></script>
Expand Down
Loading

0 comments on commit bed0a68

Please sign in to comment.