- if any_ancestor(element, lambda e: e.get('class') in ('note', 'motto', 'motto_podpis', 'dedication')
- or e.get('id') == 'nota_red'
- or e.tag == 'blockquote'):
+ def f(e):
+ return e.get('class') in ('note', 'motto', 'motto_podpis', 'dedication', 'frame') or \
+ e.get('id') == 'nota_red' or e.tag == 'blockquote'
+ if any_ancestor(element, f):