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

Allow using new lines inside tags #202

Merged
merged 1 commit into from
Mar 13, 2018
Merged

Allow using new lines inside tags #202

merged 1 commit into from
Mar 13, 2018

Conversation

ilyapuchka
Copy link
Collaborator

To make templates more readable this allows using new lines in tags (anywhere where spaces are allowed), which can be useful when dealing with really long conditions to break them into several lines.

        There are {{ articles.count }} articles.

        {% for article in articles 
                          where 
                          article.length > 100 and
                          article.author.name and
                          article.comments.count > 0
        %}    - {{ article.title }} by {{ article.author }}.
        {% endfor %}

@ilyapuchka ilyapuchka force-pushed the new-lines-inside-tags branch from 0360fe7 to 5c6e9bd Compare March 12, 2018 23:14
@kylef kylef merged commit 0bc6bd9 into master Mar 13, 2018
@kylef kylef deleted the new-lines-inside-tags branch March 13, 2018 09:07
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

Successfully merging this pull request may close these issues.

2 participants