Skip to content

Commit

Permalink
grammer, docs linkfix, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zix99 committed Jun 3, 2024
1 parent 0e12090 commit c46fe54
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/usage/funcsfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export RARE_FUNC_FILES=/path/to/custom.funcs
rare filter -m '(\d+)' -e '{double {1}}' access.log
```

Can load multiple files by specifying `--funcs` multiple times, or
providing a comma-separated list to `$RARE_FUNC_FILES`
You can load multiple files by providing `--funcs` argument multiple
times, or providing a comma-separated list to `$RARE_FUNC_FILES`

## Format

A functions file is key-value pairs of `name` to `expression`. Lines
starting with `#`, or any characters after `#`, is considered a comment.
starting with `#`, or any characters after `#`, are considered comments.

*Expressions* can be multi-line by ending the previous line with a `\`.

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ nav:
- Examples: usage/examples.md
- Advanced:
- JSON: usage/json.md
- Expression Funcs File: usage/funcsfile.md
- Funcs File: usage/funcsfile.md
- Regular Expressions: usage/regexp.md
- CLI Docs: cli-help.md
- Benchmarks: benchmarks.md
Expand Down
1 change: 0 additions & 1 deletion pkg/expressions/funcfile/stage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func TestCustomEdgeCases(t *testing.T) {
assert.Equal(t, "testval 10 missing: ", kb.BuildKey(&testContext))
}

// BenchmarkCustomFunc-4 4767489 244.2 ns/op 16 B/op 2 allocs/op
// BenchmarkCustomFunc-4 7563214 160.4 ns/op 3 B/op 1 allocs/op
func BenchmarkCustomFunc(b *testing.B) {
k := stdlib.NewStdKeyBuilder()
Expand Down
2 changes: 1 addition & 1 deletion pkg/markdowncli/replacers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func replaceWithColor(clr color.ColorCode) regexReplacerFunc {
})
}

var localLinkRegexp = regexp.MustCompile(`\[\w+\]\((\w+).md\)`)
var localLinkRegexp = regexp.MustCompile(`\[[\w\s]+\]\((\w+).md\)`)

func replaceLocalLinkWithDocsCommand(match string) string {
parts := localLinkRegexp.FindStringSubmatch(match)
Expand Down

0 comments on commit c46fe54

Please sign in to comment.