Skip to content

Commit cfdded4

Browse files
committed
_should_prioritize_renderer_stereo() now checks token_binding.text instead of the full resolved span text, so emitted stereo tokens like R, S, E, Z, cis, and trans are detected correctly.
1 parent 366ef18 commit cfdded4

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/bluenamer/name_assembly.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,12 +1766,11 @@ def _token_span_from_native_binding_group(
17661766
)
17671767

17681768

1769-
def _should_prioritize_renderer_stereo(text: str, matches: list[tuple[int, NameTokenBinding]]) -> bool:
1769+
def _should_prioritize_renderer_stereo(_text: str, matches: list[tuple[int, NameTokenBinding]]) -> bool:
17701770
"""Return whether a span is owned by an explicit stereo-renderer token."""
17711771

1772-
token_text = text.lower()
17731772
for _binding_idx, token_binding in matches:
1774-
if token_binding.token_kind == "stereo" and is_searchable_stereo_token(token_text):
1773+
if token_binding.token_kind == "stereo" and is_searchable_stereo_token(token_binding.text):
17751774
return True
17761775
if token_binding.token_kind == "locant" and token_binding.grammar_role in {"absolute_stereo", "bond_stereo"}:
17771776
return True

0 commit comments

Comments
 (0)