8000 feat(py): implement identify_partials in terms of regexps since we do not have an AST to walk #90 by yesudeep · Pull Request #150 · google/dotprompt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(py): implement identify_partials in terms of regexps since we do not have an AST to walk #90 #150

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

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

yesudeep
Copy link
Collaborator
@yesudeep yesudeep commented Mar 24, 2025

feat(py): implement identify_partials in terms of regexps since we do not have an AST to walk #90

ISSUE: #90

The JS implementation of Handlebars exposes a parse method that
returns an AST, which the dotprompt.ts implementation walks
to identify partials in the template. Since, we couldn't find any
methods in the Rust implementation yet that expose this functionality,
we've resorted to using regular expressions to match and find
partials in the template for now.

CHANGELOG:

  • Use regexps to find partials in the template.
  • Add unit tests.
  • Fix some doc comments.

… not have an AST to walk #90

ISSUE: #90

The JS implementation of Handlebars exposes a parse method that
returns an AST, which the `dotprompt.ts` implementation walks
to identify partials in the template. Since, we couldn't find any
methods in the Rust implementation yet that expose this functionality,
we've resorted to using regular expressions to match and find
partials in the template for now.

CHANGELOG:
- [ ] Use regexps to find partials in the template.
- [ ] Add unit tests.
- [ ] Fix some doc comments.
@yesudeep yesudeep force-pushed the yesudeep/feat/befitting-ground branch from 4ffe9e6 to 402e17f Compare March 24, 2025 14:35
@yesudeep yesudeep changed the title feat: implement identify_partials in terms of regexps since we do not have an AST to walk feat(py): implement identify_partials in terms of regexps since we do not have an AST to walk #90 Mar 24, 2025
@yesudeep yesudeep enabled auto-merge (squash) March 24, 2025 14:39
@yesudeep yesudeep requested a review from rutujaD1999 March 24, 2025 14:49
@yesudeep yesudeep merged commit f802275 into main Mar 24, 2025
18 checks passed
@yesudeep yesudeep deleted the yesudeep/feat/befitting-ground branch March 24, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0