Use more robust file type detection in blob than extension

Timeline

Amolith opened

When files are missing their extension, as is sometimes the case for interpreted languages because they can include the shebang at the top, we still want to provide best-effort type detection and highlighting.

Relevant files are

  • pkg/web/templates/blob.html
  • pkg/web/webui_blob.go

Amolith closed the bug