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

ERB tags nested in escaped blocks are skipped #6

Open
toncid opened this issue Dec 19, 2014 · 2 comments
Open

ERB tags nested in escaped blocks are skipped #6

toncid opened this issue Dec 19, 2014 · 2 comments

Comments

@toncid
Copy link

toncid commented Dec 19, 2014

Hello,

I'm importing a ticket from Rails: rails/rails#18098

Please find @rafaelfranca's comment (rails/rails#18098 (comment)) for a repro example.


It seems that ERB doesn't handle well tags embedded within another tag. My goal is to produce ERB code with some values prefilled in the first pass.

Input ERB code:

    <div>
        <%%= Results: <%= 'first' %> | <%= 'second' %> | <%= 'third' %> %>
    </div>

Produces the following output:

    <div>
        <%= Results: <%= 'first' %> | second | third %>
    </div>

Expected output is:

    <div>
        <%= Results: first | second | third %>
    </div>

The first nested ERB tag is skipped. The same happens when there is just one block nested.

This is reproducible in Rails v4.1.8, which is using Erubis v2.7.0.

@seuros
Copy link

seuros commented Dec 19, 2014

I think this is the wrong repo. This repo was no updated since 2011.
If i recall correctly, ERubis is part of Ruby now.

@toncid
Copy link
Author

toncid commented Dec 19, 2014

Hm, that seems unlikely. The Erubis gem hasn't been updated since 2011 as well.

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

2 participants