-        if element.getparent().tag in 'div' and 'note' in element.getparent().get('class', ''):
-            continue
-        if element.getparent().tag in 'blockquote':
+        if any_ancestor(element, lambda e: e.get('class') in ('note', 'motto', 'motto_podpis', 'dedication')
+        or e.tag == 'blockquote'):