hasufell-repository/packages/x11-misc/zim/files/Fix-reading-preformatted-text-under-Python-3.9.patch

28 lines
871 B
Diff

Upstream: sent https://github.com/zim-desktop-wiki/zim-desktop-wiki/pull/1261
From 1e63570eb941b985dc70df31043c7f4279c6a935 Mon Sep 17 00:00:00 2001
From: Alexander Kapshuna <kapsh@kap.sh>
Date: Fri, 18 Sep 2020 01:15:16 +0300
Subject: [PATCH] Fix reading preformatted text under Python 3.9
---
zim/formats/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zim/formats/__init__.py b/zim/formats/__init__.py
index e1149f7f..f22b0b0b 100644
--- a/zim/formats/__init__.py
+++ b/zim/formats/__init__.py
@@ -822,7 +822,7 @@ class ParseTreeBuilder(Builder):
self._last_char = None
def append(self, tag, attrib=None, text=None):
- attrib = attrib.copy() if attrib is not None else None
+ attrib = attrib.copy() if attrib is not None else {}
if tag in BLOCK_LEVEL:
if text and not text.endswith('\n'):
text += '\n'
--
2.28.0