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

Provide ERB support #70

Open
gazayas opened this issue Nov 17, 2023 · 0 comments
Open

Provide ERB support #70

gazayas opened this issue Nov 17, 2023 · 0 comments
Labels

Comments

@gazayas
Copy link
Owner

gazayas commented Nov 17, 2023

There's an issue open at Ruby LSP about reading ERB information: Shopify/ruby-lsp#1055

We might be able to glean some content from there to read files in masamune and return Prism nodes for the information we're looking for.

I'm specifically thinking of this BlockManipulator class which uses ERB syntax in its tests. We rely on strings now, but it would be better to rely on Prism nodes.

https://github.com/bullet-train-co/bullet_train-core/blob/e6b16c207f63f83750de33f1f7bbe6473f342748/bullet_train-super_scaffolding/lib/scaffolding/block_manipulator.rb#L161-L172

https://github.com/bullet-train-co/bullet_train-core/blob/e6b16c207f63f83750de33f1f7bbe6473f342748/bullet_train-super_scaffolding/test/lib/scaffolding/block_manipulator_test.rb#L24-L47

@gazayas gazayas added enhancement New feature or request feature and removed enhancement New feature or request labels Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant