Skip to content

Commit

Permalink
fix: Identify pages by their type rather than a simple keyword. #169
Browse files Browse the repository at this point in the history
  • Loading branch information
bookfere committed Nov 11, 2023
1 parent d1e45b0 commit 782ea61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def load_element_patterns(self):

def get_sorted_pages(self):
return sorted(
[page for page in self.pages if 'html' in page.media_type],
[p for p in self.pages if isinstance(p.data, etree._Element)],
key=lambda page: sorted_mixed_keys(page.href))

def get_elements(self):
Expand Down

0 comments on commit 782ea61

Please sign in to comment.