From dbafafcba55807af1af22797e5d233b517edc708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Thu, 3 Nov 2022 23:35:56 +0100 Subject: [PATCH] Indent list-group inside current node if part of a block. --- org_rw/org_rw.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org_rw/org_rw.py b/org_rw/org_rw.py index 6cbd04b..ffd6967 100644 --- a/org_rw/org_rw.py +++ b/org_rw/org_rw.py @@ -395,9 +395,12 @@ class Headline: or isinstance(current_node, dom.BlockNode) or isinstance(current_node, dom.DrawerNode) ): + was_node = current_node current_node = dom.ListGroupNode() - if current_node is None: + if was_node is None: tree.append(current_node) + else: + was_node.append(current_node) indentation_tree.append(current_node) if not isinstance(current_node, dom.ListGroupNode): if not isinstance(current_node, dom.ListGroupNode):