about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2022-01-11 22:25:23 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2022-01-11 22:25:23 +0700
commit48dfd66cae2811933b195b42d787e36b9e5d9298 (patch)
tree66f1e649d6894d5b37585888f230c6f16f1c8b31
parent76f60ec2bda8670435a00cb2eb857f2f1018177d (diff)
downloadformbox-48dfd66cae2811933b195b42d787e36b9e5d9298.tar.gz
Expose in_reply_to substitution 0.3.0
-rw-r--r--pyproject.toml2
-rw-r--r--src/formbox.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/pyproject.toml b/pyproject.toml
index b3a8166..5a90ab5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
 
 [project]
 name = "formbox"
-version = "0.2.0"
+version = "0.3.0"
 description = "Format mbox as HTML/XML"
 readme = "README.md"
 requires-python = ">=3.6"
diff --git a/src/formbox.py b/src/formbox.py
index 5e30faf..beb9246 100644
--- a/src/formbox.py
+++ b/src/formbox.py
@@ -77,7 +77,8 @@ def render(template, archive, parent):
         # Please don't have space in email addresses
         author = ' '.join(decode(self['From'])).rsplit(maxsplit=1)[0]
         rendered_children = render(template, archive, message_id)
-        yield template.format(message_id=quote(message_id),
+        yield template.format(in_reply_to=quote(parent),
+                              message_id=quote(message_id),
                               mailto_params=urlencode(dict(reply_to(self))),
                               date=date(self).isoformat(), author=author,
                               body=body, children='\n'.join(rendered_children))