mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
Make TUI find markdowns with a variety of file extensions
List from GitHub's supported extensions: - .md - .markdown - .mdown - .mkdn - .mkd Fixes #233.
This commit is contained in:
parent
0da9927f37
commit
2088bac668
1 changed files with 5 additions and 1 deletions
6
ui/ui.go
6
ui/ui.go
|
@ -32,6 +32,10 @@ var (
|
|||
config Config
|
||||
glowLogoTextColor = lib.Color("#ECFD65")
|
||||
|
||||
markdownExtensions = []string{
|
||||
"*.md", "*.mdown", "*.mkdn", "*.mkd", "*.markdown",
|
||||
}
|
||||
|
||||
// True if we're logging to a file, in which case we'll log more stuff.
|
||||
debug = false
|
||||
|
||||
|
@ -526,7 +530,7 @@ func findLocalFiles(m model) tea.Cmd {
|
|||
ignore = ignorePatterns(m)
|
||||
}
|
||||
|
||||
ch, err := gitcha.FindFilesExcept(cwd, []string{"*.md"}, ignore)
|
||||
ch, err := gitcha.FindFilesExcept(cwd, markdownExtensions, ignore)
|
||||
if err != nil {
|
||||
if debug {
|
||||
log.Println("error finding local files:", err)
|
||||
|
|
Loading…
Reference in a new issue