kivikakk / comrak

CommonMark + GFM compatible Markdown parser and renderer
Other
1.17k stars 140 forks source link

Expand traverse and descendants documentation: Issue #369 #375

Closed kaesluder closed 5 months ago

kaesluder commented 5 months ago

original traverse documentation is a shortened version of descendants documentation. Edited documentation comments to clarify the following:

  1. traverse and reverse_traverse return an iterator of NodeEdge objects. NodeEdge objects mark start (similar to <div>) and end (similar to </div>) of each node.

  2. descendants returns an iterator of Node objects. This is probably more useful if you want to play with the Node contents.

  3. added a short "Similar Functions" section to the inline documentation to point users in the right direction.

Improves on issue #369

kivikakk commented 5 months ago

Thank you!