Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Matcher ¶ added in v0.4.28
type Matcher struct {
// contains filtered or unexported fields
}
func NewMatcher ¶ added in v0.4.28
NewMatcher returns a new prefix Cutter.
WithPattern provides a user-specified sequence of white-space-separated tokens to skip when looking for the start of a table row or ruler.
Each token may appear any number of times, but the tokens must appear in the provided order.
The pattern provided will be converted into a regular expression of the form (expanded for readibility):
^\s* ( {token-1} \s* )* ( {token-2} \s* )* ...
The default pattern is simply: "^\s*"
Example Patterns:
"//": golang comments "#": shell comments "// #": shell comments within go code matches >1 of white-space separated "//"'s followed by >1 "#"
For example, the pattern "// #" would allow the following table to be reformatted:
// // # # | one | two | three | // // # # | ---- | ------- | ------- | // // # # | data | numbers | letters |
Click to show internal directories.
Click to hide internal directories.