The node's `attributes` key-value pairs normalized and tokenized for search.
(data: dict)
| 534 | |
| 535 | |
| 536 | def _node_attributes_text(data: dict) -> tuple[str, str]: |
| 537 | """The node's `attributes` key-value pairs normalized and tokenized for search.""" |
| 538 | attrs = data.get("attributes") |
| 539 | if not isinstance(attrs, dict) or not attrs: |
| 540 | return "", "" |
| 541 | parts: list[str] = [] |
| 542 | _flatten_attr_text(attrs, parts) |
| 543 | if not parts: |
| 544 | return "", "" |
| 545 | raw_text = " ".join(parts) |
| 546 | norm = _strip_diacritics(raw_text).lower() |
| 547 | tokens = " ".join(_search_tokens(norm)) |
| 548 | return norm, tokens |
| 549 | |
| 550 | |
| 551 |
no test coverage detected