diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-08 23:34:43 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-08 23:34:43 +0300 |
| commit | 30de46549dd219916aadc12ec02efdb1f2d127aa (patch) | |
| tree | adb57ec3a25e6e7441df910afe531454d438d597 | |
| parent | df623bfdcecad9fd4c0f5229ce9af5e8416a9558 (diff) | |
feat: add AWK language support for syntax highlighting
- 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 <noreply@anthropic.com>
| -rw-r--r-- | internal/showcase/code_extractor.go | 1 | ||||
| -rw-r--r-- | internal/showcase/language_detector.go | 1 | ||||
| -rw-r--r-- | internal/showcase/showcase.go | 1 |
3 files changed, 3 insertions, 0 deletions
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 { |
