+
Skip to content

How to use [ and ] characters in cells ? #311

@quantumsheep

Description

@quantumsheep

style_parser.go implements a special feature where [ and ] characters are used to separate styled text.

termui/style_parser.go

Lines 19 to 20 in f976fe6

tokenBeginStyledText = '['
tokenEndStyledText = ']'

termui/style_parser.go

Lines 105 to 112 in f976fe6

case parserStateDefault:
if _rune == tokenBeginStyledText {
state = parserStateStyledText
squareCount = 1
styledText = append(styledText, _rune)
} else {
cells = append(cells, Cell{_rune, defaultStyle})
}

Which ends up cropping the text:
CleanShot 2022-02-07 at 16 35 46@2x

Is there a way to disable this feature without having to edit the code ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载