Skip to content

Commit

Permalink
fix errors of lints
Browse files Browse the repository at this point in the history
  • Loading branch information
henry0312 committed Sep 24, 2023
1 parent 792af68 commit 8c6830d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions extension/cjk.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ type CJKOption func(*cjk)
type EastAsianLineBreaksStyle int

const (
// EastAsianLineBreaksStyleSimple is a style where soft line breaks are ignored
// if both sides of the break are east asian wide characters.
EastAsianLineBreaksStyleSimple EastAsianLineBreaksStyle = iota
// EastAsianLineBreaksCSS3Draft is a style where soft line breaks are ignored
// even if only one side of the break is an east asian wide character.
EastAsianLineBreaksCSS3Draft
)

type EastAsianLineBreaksFunction func()

// WithEastAsianLineBreaks is a functional option that indicates whether softline breaks
// between east asian wide characters should be ignored.
func WithEastAsianLineBreaks(style ...EastAsianLineBreaksStyle) CJKOption {
Expand Down
5 changes: 5 additions & 0 deletions renderer/html/html.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,15 @@ func WithHardWraps() interface {
// EastAsianLineBreaks is an option name used in WithEastAsianLineBreaks.
const optEastAsianLineBreaks renderer.OptionName = "EastAsianLineBreaks"

// A EastAsianLineBreaksStyle is a style of east asian line breaks.
type EastAsianLineBreaksStyle int

const (
// EastAsianLineBreaksStyleSimple is a style where soft line breaks are ignored
// if both sides of the break are east asian wide characters.
EastAsianLineBreaksStyleSimple EastAsianLineBreaksStyle = iota
// EastAsianLineBreaksCSS3Draft is a style where soft line breaks are ignored
// even if only one side of the break is an east asian wide character.
EastAsianLineBreaksCSS3Draft
)

Expand Down

0 comments on commit 8c6830d

Please sign in to comment.