You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
whitespace-example.html.zip
In a Kit file, when compiling includes/imports that have a bunch of variables defined leading whitespace from those variables is compiled in the output. Tabs/whitespace are added up and then used as the indent factor. That messes up the indented markup in the final HTML file.
Thanks from a longlasting Codekit enthousiast!
The text was updated successfully, but these errors were encountered:
The example code doesn't appear to have made it on your post, but from the description this sounds like intended behavior.
The Kit compiler never adjusts any whitespace outside of a variable declaration. If you have whitespace before the declaration, that whitespace will be preserved, just as any other text would be preserved.
The compiler removes only the special comment; nothing around it.
Thanks for your reply. I just added the example code, but it sounds like I have to find another solution for this. It's not a big deal, but I like clean indented code and I'm just ashamed when I have to deploy this to the back-end department :-)
With Twig you can do this for example:
{% include '/src/templates/03-components/_card.kit' with {
'size': 'medium',
'image': '/_boilerplate/media/landscape-01.jpg',
'title': 'Lorem ipsum dolor sit',
'description': 'Consectetur adipiscing elit donec a fringilla sem, nec iaculis felis'
}%}
whitespace-example.html.zip
In a Kit file, when compiling includes/imports that have a bunch of variables defined leading whitespace from those variables is compiled in the output. Tabs/whitespace are added up and then used as the indent factor. That messes up the indented markup in the final HTML file.
Thanks from a longlasting Codekit enthousiast!
The text was updated successfully, but these errors were encountered: