Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(2d): code range helpers #947

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

aarthificial
Copy link
Contributor

Adds helpers for easier construction of code ranges based on the displayed code:

  • findAllRanges
  • findFirstRange
  • findLastRange

Example:

// Select the last occurrence of the word "hello":
code().selection(
  code().findLastRange('hello')
);

@aarthificial aarthificial merged commit 044c9ac into motion-canvas:main Feb 9, 2024
9 checks passed
@aarthificial aarthificial deleted the code-range-helpers branch February 9, 2024 14:40
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.

None yet

1 participant