Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed ascii degrading from 'defaultStyleName' #275

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ go 1.17
require (
github.com/IGLOU-EU/go-wildcard v1.0.3
github.com/jedib0t/go-pretty/v6 v6.4.6
github.com/mattn/go-runewidth v0.0.14
github.com/muesli/mango v0.2.0
github.com/muesli/roff v0.1.0
github.com/muesli/termenv v0.15.1
Expand All @@ -17,5 +16,6 @@ require (
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
)
10 changes: 0 additions & 10 deletions style.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
package main

import "github.com/mattn/go-runewidth"

func defaultStyleName() string {
/*
Due to a bug in github.com/mattn/go-runewidth v0.0.9, the width of unicode rune(such as '╭') could not be correctly
calculated. Degrade to ascii to prevent broken table structure. Remove this once the bug is fixed.
*/
if runewidth.RuneWidth('╭') > 1 {
return "ascii"
}

return "unicode"
}