Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tony/django-docutils
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8c92bdb2578e85049fd549659bc54df09a1c05c8
Choose a base ref
..
head repository: tony/django-docutils
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 51d1d9ecacc279149cc62a43f44b07c8c2037806
Choose a head ref
Showing with 5 additions and 2 deletions.
  1. +1 −1 pyproject.toml
  2. +4 −1 src/django_docutils/template.py
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ dev-dependencies = [
"mypy",
"django-stubs",
"docutils-stubs",
"types-docutils", # breaks typings
"types-docutils",
"types-Pygments",
"types-pytz",
]
5 changes: 4 additions & 1 deletion src/django_docutils/template.py
Original file line number Diff line number Diff line change
@@ -68,7 +68,10 @@ def render(
context["csrf_token"] = csrf_token_lazy(request)
context = {"source": self.source, "writer_name": "html"}

return mark_safe(t.cast("str", core.publish_parts(**context)["html_body"]))
parts = core.publish_parts(**context)["html_body"]
assert isinstance(parts, str)

return mark_safe(parts)


register_pygments_directive()