-
Notifications
You must be signed in to change notification settings - Fork 1.5k
website: Add support for rego string interpolation #8092
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
website: Add support for rego string interpolation #8092
Conversation
e04b62a to
a4d556b
Compare
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
srenatus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
|
Hmm funny how dark mode has more italic 😎 |
Indeed, there are some oddities with the default themes... I looked into migrating to using https://shiki.style instead so we could use the same grammar as vscode-opa but that wasn't as simple as this and was further from the safe path of docusaurus so I went with this instead! |
This adds a custom rego theme for prism since they are not accepting mainline updates right now. Signed-off-by: Charlie Egan <[email protected]>
a4d556b to
9812dbe
Compare
Implement string interpolation for both double-quoted and raw strings:
- $"{expr}" for double-quoted interpolated strings
- $`{expr}` for raw interpolated strings
Please see open-policy-agent/opa#8109 for the upstream
work on this same feature.
Other related merged PRs for other editors and projects:
- open-policy-agent/vscode-opa#375 (VS Code OPA ext)
- open-policy-agent/opa#8092 (OPA Docs)
Signed-off-by: Charlie Egan <[email protected]>
Implement string interpolation for both double-quoted and raw strings:
- $"{expr}" for double-quoted interpolated strings
- $`{expr}` for raw interpolated strings
Please see open-policy-agent/opa#8109 for the upstream
work on this same feature.
Other related merged PRs for other editors and projects:
- open-policy-agent/vscode-opa#375 (VS Code OPA ext)
- open-policy-agent/opa#8092 (OPA Docs)
* Updates to modernize project - Run tree-sitter init to generate modern bindings for various languages. - Add ESLint configuration based on eslint-config-treesitter. - Update Node version to v24.11.1 in .nvmrc - Update README with npm commands, I have migrated to npm as it's what other similar projects seem to be using. I have used https://github.com/tree-sitter/tree-sitter-rust/tree/master, as an example for a number of the updates. * Add string interpolation support Implement string interpolation for both double-quoted and raw strings: - $"{expr}" for double-quoted interpolated strings - $`{expr}` for raw interpolated strings Please see open-policy-agent/opa#8109 for the upstream work on this same feature. Other related merged PRs for other editors and projects: - open-policy-agent/vscode-opa#375 (VS Code OPA ext) - open-policy-agent/opa#8092 (OPA Docs) * Update CI workflow to Node.js 24 and npm * Restore use of yarn for tasks and packaging Requested from review comments on #19
This adds a custom rego theme for prism since they are not accepting mainline updates right now.
Example in light and dark