geohci / edit-types

Edit diffs and type detection for Wikipedia
MIT License
12 stars 3 forks source link

Adapt node differ for new node types (Media/Category) #2

Closed geohci closed 2 years ago

geohci commented 2 years ago

The link disambiguation code that identified whether a wikilink was a category or image link was moved to the tree differ to handle the issue of determining whether a link should contribute to the text in a section or not (wikilinks should; images/categories should not). The node differ now no longer needs to do that disambiguation work but should expect nodes with type Category and Media instead. See: https://github.com/geohci/edit-types/blob/main/edittypes/tree_differ.py#L42