Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, to me they look like the output that I get when I'm writing with Go templates (non-minified afterwards).

eg:

    <html>
      {{ if eq .FOO "bar" }}
        <some tags here>
      {{ end }}

      <other stuff>

      {{ if eq .BAZ "bim" }}
        <some tags here>
      {{ end }}
    </html>
That ends up generating blank lines all over the place, very much like the output they have. ;)


The revision history doesn't seem to support that. They seem to just mash enter a lot.

Especially it looks like they have lots of edits where they add blank lines and then another tag, and then remove the new tag but not the blank line. E.g. https://github.com/thstsa/spacetourism/commit/6411ce05009cc6...

Or sometimes just replacing things they intend to outright remove with blank lines.

With multiple committers, it seems unlikely they're all templating and then checking in the output of the template engine.


Oh, that's a good point. Yeah, I think you're probably right. :)


Fwiw you can strip the space with:

    {{- [...] -}}
(Or just one side) and put back the right amount with:

    {{ [...] | [n]indent X }}
(Where X is the number of spaces to indent)


Thanks heaps, learn something every day. :)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: