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

SyntaxError when rendering ERB <%= with a block #333

Closed
programmarchy opened this issue Sep 28, 2018 · 3 comments
Closed

SyntaxError when rendering ERB <%= with a block #333

programmarchy opened this issue Sep 28, 2018 · 3 comments

Comments

@programmarchy
Copy link

Potentially related to sinatra/sinatra#1480

Rendering <%= yield_content :title do %>Default Title<% end %> throws a SyntaxError in tilt's template.rb.

@judofyr
Copy link
Collaborator

judofyr commented Oct 7, 2018

ERB (that ships with Ruby) doesn't support block helpers by default. I'm guessing Sinatra uses a different template engine and it's somehow not being registered. It's a bit difficult for me to help without knowing the approach that Sinatra uses.

@judofyr judofyr closed this as completed Oct 7, 2018
@jkowens
Copy link

jkowens commented Nov 28, 2018

@judofyr thanks for your response. Sinatra uses ERB unless the erubis gem is loaded. I don't think either support block helpers as you mentioned. Do you know of any options to provide support for this syntax?

@jkowens
Copy link

jkowens commented Nov 29, 2018

Sorry nevermind, I discovered Sinatra makes the ERB output var available to be modified.

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

No branches or pull requests

3 participants