Handle Invalid Markdown (#218)
markdown: use builtin dark/light theme detection handle invalid markdown Co-authored-by: Norwin Roosen <git@nroo.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/218 Reviewed-by: 6543 <6543@noreply.gitea.io> Reviewed-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
@@ -6,17 +6,8 @@ package print
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/muesli/termenv"
|
||||
)
|
||||
|
||||
func getGlamourTheme() string {
|
||||
if termenv.HasDarkBackground() {
|
||||
return "dark"
|
||||
}
|
||||
return "light"
|
||||
}
|
||||
|
||||
// formatSize get kb in int and return string
|
||||
func formatSize(kb int64) string {
|
||||
if kb < 1024 {
|
||||
|
||||
Reference in New Issue
Block a user