Closed sati-bodhi closed 1 year ago
Hey, thanks for the contribution. I am not sure it makes sense to keep in main node class because it's a bit too specific to your usecase -- at the very least this needs a test (otherwise someone else might break it by accident).
I am willing to include it in a separate file like contrib.py
if you want though -- that would mean it's not exposed as a public API, but still can be used by you. Feel free to do that and reopen if you want :)
I wrote a
get_nodes_with_heading
function innode.py
for my own project so that one can easily zoom-in on nodes with a certain heading in the loaded document.Example Usage:
Hope the community would find this useful.