Home

Show tabs in code blocks 4 columns wide

Release #008

Branch feature/tab-size · version 0.5.1

What changed

  • tab-size: 4 on code blocks. Browsers show a tab as 8 columns by default. gofmt indents Go with tabs, so quoted Go code ran past the edge of its box two levels in. Code blocks now show tabs 4 columns wide.
  • Test: the stylesheet test checks the rule is there.
  • Version: 0.5.1.

Notes

  • Posts can now quote Go exactly as gofmt writes it, with tabs, instead of re-indenting with spaces. The pinned-posts post was re-indented with spaces before this fix and looks the same either way.
  • The stylesheet's content hash changes, so browsers fetch the new file on their next visit without a hard refresh (v0.2.1).

Testing

  • All tests pass with the race detector (go test -race ./...).
  • Rendered the same tab-indented Go snippet with the old and new stylesheet:
Before (8 columns) After (4 columns)
Before After

Screenshots

From the branch's build running locally. The home page doesn't change.

Desktop Mobile
Desktop Mobile

🤖 Generated with Claude Code