Skip to content

Commit

Permalink
Remove newlines from chunks macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris AtLee committed Mar 5, 2010
1 parent 95d0542 commit d04983d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions buildbot/status/web/templates/logs.html
Expand Up @@ -11,9 +11,7 @@
{%- endmacro -%}

{%- macro chunks(entries) -%}
{%- for entry in entries -%}
<span class="{{ entry.type }}">{{ entry.text|e }}</span>
{% endfor -%}
{%- for entry in entries -%}<span class="{{ entry.type }}">{{ entry.text|e }}</span>{% endfor -%}
{%- endmacro -%}

{%- macro page_footer() -%}
Expand Down

6 comments on commit d04983d

@marcus-sonestedt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of setting everything on one line, you can use the - markers.

{% endfor -%} is missing one here. Replace with {%- endfor -%} to collapse all whitespace between and {% ..

@djmitche
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's what the -'s do!

So catlee's changes in the newlines in this diff aren't necessary -- just the "-"?

@marcus-sonestedt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Precisely.

(Sidenote: I don't know why catlee wanted the newlines removed in this case. I prefer at least one new-line per list item in general, to make the html more easier to read, but I assume there was a good reason here...)

@djmitche
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

He's probably using some inferior browser like IE that gets confused by the whitespace ;)

@djmitche
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcus-sonestedt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ow.. dude.. you do not joke about such things.. ;-P

Commit looks good!

Please sign in to comment.