Find deepest level in stacked spans.
(self)
| 2675 | return self |
| 2676 | |
| 2677 | def span_bottom(self): |
| 2678 | """Find deepest level in stacked spans.""" |
| 2679 | parent = self |
| 2680 | child = self.last_child |
| 2681 | if child is None: |
| 2682 | return None |
| 2683 | while child.is_text: |
| 2684 | child = child.previous |
| 2685 | if child is None: |
| 2686 | break |
| 2687 | if child is None or child.tagname != "span": |
| 2688 | return None |
| 2689 | |
| 2690 | while True: |
| 2691 | if child is None: |
| 2692 | return parent |
| 2693 | if child.tagname in ("a", "sub","sup","body") or child.is_text: |
| 2694 | child = child.next |
| 2695 | continue |
| 2696 | if child.tagname == "span": |
| 2697 | parent = child |
| 2698 | child = child.first_child |
| 2699 | else: |
| 2700 | return parent |
| 2701 | |
| 2702 | @property |
| 2703 | def tagname( self): |
no outgoing calls
no test coverage detected