From 30de46549dd219916aadc12ec02efdb1f2d127aa Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 8 Jul 2025 23:34:43 +0300 Subject: feat: add AWK language support for syntax highlighting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add AWK to language detection (.awk files) - Add AWK to code extractor language extensions - Add AWK to syntax highlighting mapping - Note: cpuinfo project is detected as Make-only because the main script has no file extension (it's a shell script with embedded AWK) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- internal/showcase/code_extractor.go | 1 + internal/showcase/language_detector.go | 1 + internal/showcase/showcase.go | 1 + 3 files changed, 3 insertions(+) (limited to 'internal') diff --git a/internal/showcase/code_extractor.go b/internal/showcase/code_extractor.go index b51761c..98e1aca 100644 --- a/internal/showcase/code_extractor.go +++ b/internal/showcase/code_extractor.go @@ -48,6 +48,7 @@ func extractCodeSnippet(repoPath string, languages []LanguageStats) (string, str "SQL": {".sql"}, "Make": {"Makefile", "makefile", "GNUmakefile"}, "HCL": {".tf", ".tfvars", ".hcl"}, + "AWK": {".awk"}, } // Get file extensions for the primary language diff --git a/internal/showcase/language_detector.go b/internal/showcase/language_detector.go index f99e8cb..cb9c591 100644 --- a/internal/showcase/language_detector.go +++ b/internal/showcase/language_detector.go @@ -75,6 +75,7 @@ func detectLanguages(repoPath string) (languages []LanguageStats, documentation ".tf": "HCL", ".tfvars": "HCL", ".hcl": "HCL", + ".awk": "AWK", } // Define documentation/text extensions diff --git a/internal/showcase/showcase.go b/internal/showcase/showcase.go index 884f81a..bfd7bc8 100644 --- a/internal/showcase/showcase.go +++ b/internal/showcase/showcase.go @@ -760,6 +760,7 @@ func extractLanguageForHighlighting(codeLanguage string) string { "toml": "toml", "hcl": "hcl", "vim": "vim", + "awk": "awk", } if mapped, ok := languageMap[lang]; ok { -- cgit v1.2.3