Skip to content

refactor: use getNextCustomAtomLabel from openchemlib#74

Merged
tpoisseau merged 2 commits intomainfrom
62-quicknumbering---support-more-generic-patterns
Dec 19, 2025
Merged

refactor: use getNextCustomAtomLabel from openchemlib#74
tpoisseau merged 2 commits intomainfrom
62-quicknumbering---support-more-generic-patterns

Conversation

@tpoisseau
Copy link
Contributor

Refs: #62

@tpoisseau tpoisseau linked an issue Dec 15, 2025 that may be closed by this pull request
@tpoisseau tpoisseau requested a review from lpatiny December 15, 2025 09:24
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 15, 2025

Deploying react-ocl with  Cloudflare Pages  Cloudflare Pages

Latest commit: 44fa0ee
Status:⚡️  Build in progress...

View logs

@tpoisseau
Copy link
Contributor Author

tpoisseau commented Dec 15, 2025

As you asked @lpatiny I switch to getNextCustomAtomLabel from openchemlib.

  1. getNextCustomAtomLabel don't take care of ] prefix So I have to do some tricks in react-ocl to have same render.
  2. https://github.com/cheminfo/openchemlib-js/blob/592f5d3e71ffc312a3117232c76685135de4dc4e/lib/extend/appendGetNextCustomAtomLabel.js#L49 return '1' but should return ]1 as fallback in our context.
  3. It does not supports greeks letters. I expect getNextCustomAtomLabel(']α') returns ']β' but it returns '1' (fallback)

Copy link
Contributor

@lpatiny lpatiny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as I expect thanks.

@tpoisseau tpoisseau enabled auto-merge (squash) December 19, 2025 08:41
@tpoisseau tpoisseau disabled auto-merge December 19, 2025 08:41
@tpoisseau tpoisseau enabled auto-merge (squash) December 19, 2025 08:41
@tpoisseau tpoisseau merged commit 422c896 into main Dec 19, 2025
10 of 11 checks passed
@tpoisseau tpoisseau deleted the 62-quicknumbering---support-more-generic-patterns branch December 19, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QuickNumbering] - Support more generic patterns

2 participants