Type Alias: SoftWordBreakPattern
SoftWordBreakPattern =
string
Defined in: cspell-types/dist/index.d.mts:1422
Defines a word break rule based on a string.
Format:
"before|after"-- Matches a word break betweenbeforeandafter"before|after$"-- Matches a word break betweenbeforeandafterat the end of a word"^before|after"-- Matches a word break betweenbeforeat the start of a word andafter"^before|after$"-- Matches a word break betweenbeforeat the start of a word andafterat the end of a word"before|"-- Matches a word break afterbefore"^before|"-- Matches a word break afterbeforeat the start of a word"|after"-- Matches a word break beforeafter"|after$"-- Matches a word break beforeafterat the end of a word
Where before is the text before the word break and after is the text after the word break.
Special characters like |, ^, and $ have specific meanings.
|-- Represents the position of the word break^-- Indicates the start of a word$-- Indicates the end of a word
For more complicated word break rules, consider using regular expressions with the SoftWordBreakRegExp type.
Examples:
"^ptr|"-- Would help with pointer definitions starting withptr, such asptrvalue."^I|"-- Would help with interface definitions starting withI, such asIERROR.
Since
10.3.1