MCPcopy Create free account
hub / github.com/cogentcore/core / HasPre

Method HasPre

styles/text.go:230–237  ·  view source on GitHub ↗

HasPre returns true if current white space option preserves existing whitespace (or at least requires that parser in case of PreLine, which is intermediate)

()

Source from the content-addressed store, hash-verified

228// whitespace (or at least requires that parser in case of PreLine, which is
229// intermediate)
230func (ts *Text) HasPre() bool {
231 switch ts.WhiteSpace {
232 case WhiteSpaceNormal, WhiteSpaceNowrap:
233 return false
234 default:
235 return true
236 }
237}

Callers 2

SetHTMLMethod · 0.80
SetHTMLBytesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected