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

Does not work correctly for macros. #4

Open
bvsn opened this issue Nov 17, 2012 · 3 comments
Open

Does not work correctly for macros. #4

bvsn opened this issue Nov 17, 2012 · 3 comments

Comments

@bvsn
Copy link

bvsn commented Nov 17, 2012

{% macro render_menu(model, style='b-menu_type_header') %}
    <ul class="b-menu {{ style }}">

Got next html:

<ul class="b-menub-menu_type_header">

It is also does not work if I put the variable into class tag.

@ostronom
Copy link

A workaround: -- prepend {{ style }} with {{ " " }}.

@bvsn
Copy link
Author

bvsn commented Nov 20, 2012

This is not correct.

@eli-collins
Copy link

I think this is similar to issue 8 -- I've got a fork of this module over in https://github.com/eli-collins/jinja2-htmlcompress with a rewritten parser that should take care of this issue - it's a little less agressive / smarter about when it completely removes spaces.

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