Question: unexpected Heading title type #6
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I see that the
title
attribute ofHeading
has a typeText
instead a string.Is there any reason behind this? It's preventing me from doing:
With the next error
Operator "in" not supported for types "Literal['test 1']" and "Text"
.Would it be possible to change the line to:
if it breaks stuff I can use
org_file.headlines[0].title.get_text()
but is the ergonomics of the class I expectedLet me implement the
in
operator for the Text class (though I'm not sure how to handle some parts, but I'll try to work it out).It's not returning a string because it can contain Links or other kinds of markup that can be useful to handle.