orgparse
orgparse copied to clipboard
Logbook drawer tags are not removed from body text
trafficstars
This issue is also mentioned in #38, but haven't been resolved in the latest version 36b31d8151e45ac6701822864816b48446d3dcad.
Test case (repeated task), modified from doctest:
>>> from orgparse import loads
>>> node = loads('''
... * TODO Pay the rent
... DEADLINE: <2005-10-01 Sat +1m>
... :LOGBOOK:
... - State "DONE" from "TODO" [2005-09-01 Thu 16:10]
... - State "DONE" from "TODO" [2005-08-01 Mon 19:44]
... - State "DONE" from "TODO" [2005-07-01 Fri 17:27]
... :END:
... ''').children[0]
>>> print(node.body)
:LOGBOOK:
:END:
Test case (clock):
>>> from orgparse import loads
>>> node = loads('''\
... * TODO Clock
... :LOGBOOK:
... CLOCK: [2022-01-01 Sat 00:00]--[2022-01-01 Sat 01:11] => 1:11
... :END:
... ''').children[0]
>>> print(node.body)
:LOGBOOK:
:END:
Happy to accept the fix :)