Skip to content

Commit

Permalink
Support preview of file with the suffix .conf
Browse files Browse the repository at this point in the history
  • Loading branch information
josing authored and josing committed Jul 3, 2021
1 parent c7ffc67 commit 5455402
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion previewer/code.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ var ExtJSMap = map[string]template.HTML{
".xml": "xml",
".coffee": "coffee",
".sh": "sh",
".log": "log",
".log": "log",
".conf": "conf",
}

func (i *Code) Preview(content []byte) template.HTML {
Expand Down
2 changes: 1 addition & 1 deletion previewer/previewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var image = new(Image)
var codeExtensions = [...]string{
".go", ".php", ".html", ".css", ".js", ".py", ".md",
".c", ".cpp", ".java", ".sh", ".tmpl", ".mod", ".sum",
".sql", ".json", ".txt", ".yml", "yaml", ".log",
".sql", ".json", ".txt", ".yml", "yaml", ".log", ".conf",
}

func IsCode(ext string) bool {
Expand Down

0 comments on commit 5455402

Please sign in to comment.