Skip to content

Commit e76ff39

Browse files
authored
fix typos (#158)
* Fix some typos in code and documentation * Fix acronyms in code and documentation Some are registered tradmarks.
1 parent f7f622d commit e76ff39

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7-
NOTE: As semantic versioning states all 0.y.z releases can contain breaking changes in API (flags, grpc API, any backward compatibility)
7+
NOTE: As semantic versioning states all 0.y.z releases can contain breaking changes in API (flags, gRPC API, any backward compatibility)
88

99
We use *breaking* word for marking changes that are not backward compatible (relates only to v0.y.z releases.)
1010

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/bwplotka/mdox) [![Latest Release](https://img.shields.io/github/release/bwplotka/mdox.svg?style=flat-square)](https://github.com/bwplotka/mdox/releases/latest) [![CI](https://github.com/bwplotka/mdox/workflows/go/badge.svg)](https://github.com/bwplotka/mdox/actions?query=workflow%3Ago) [![Go Report Card](https://goreportcard.com/badge/github.com/bwplotka/mdox)](https://goreportcard.com/report/github.com/bwplotka/mdox) [![Slack](https://img.shields.io/badge/join%20slack-%23mdox-brightgreen.svg)](https://cloud-native.slack.com/archives/mdox)
44

5-
`mdox` (spelled as `md docs`) is a CLI for maintaining automated, high-quality project documentation and website leveraging [Github Flavored Markdown](https://github.github.com/gfm/) and git.
5+
`mdox` (spelled as `md docs`) is a CLI for maintaining automated, high-quality project documentation and website leveraging [GitHub Flavored Markdown](https://github.github.com/gfm/) and git.
66

77
This project can be used both as CLI as well as a library.
88

@@ -34,7 +34,7 @@ For example, this README is formatted by the CI on every PR using [`mdox fmt -l
3434
```bash mdox-exec="mdox fmt --help"
3535
usage: mdox fmt [<flags>] <files>...
3636

37-
Formats in-place given markdown files uniformly following GFM (Github Flavored
37+
Formats in-place given markdown files uniformly following GFM (GitHub Flavored
3838
Markdown: https://github.github.com/gfm/). Example: mdox fmt *.md
3939

4040

@@ -177,7 +177,7 @@ So passing in regex such as `--links.localize.address-regex="https:\/\/example\.
177177
178178
### Transformation
179179
180-
mdox allows various types of markdown file transformation which are useful for website pre-processing and is often required when using static site generators like Hugo. It helps in generating front/backmatter, renaming and moving files, and converts links to work on websites.
180+
mdox allows various types of markdown file transformation which are useful for website pre-processing and is often required when using static site generators like Hugo. It helps in generating front/backmatter, renaming, and moving files, and converts links to work on websites.
181181
182182
Just run `mdox transform --config-file=.mdox.yaml` and pass in YAML configuration.
183183
@@ -280,7 +280,7 @@ YAML can be passed in directly as well using `--config` flag! For more details [
280280
Requirements to build this tool:
281281
282282
* Go 1.19+
283-
* Linux or MacOS
283+
* Linux or macOS
284284
285285
```shell
286286
go install github.com/bwplotka/mdox@latest

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func interrupt(logger log.Logger, cancel <-chan struct{}) error {
198198
}
199199

200200
func registerFmt(_ context.Context, app *extkingpin.App, metricsPath *string) {
201-
cmd := app.Command("fmt", "Formats in-place given markdown files uniformly following GFM (Github Flavored Markdown: https://github.github.com/gfm/). Example: mdox fmt *.md")
201+
cmd := app.Command("fmt", "Formats in-place given markdown files uniformly following GFM (GitHub Flavored Markdown: https://github.github.com/gfm/). Example: mdox fmt *.md")
202202
files := cmd.Arg("files", "Markdown file(s) to process.").Required().ExistingFiles()
203203
checkOnly := cmd.Flag("check", "If true, fmt will not modify the given files, instead it will fail if files needs formatting").Bool()
204204
softWraps := cmd.Flag("soft-wraps", "If true, fmt will preserve soft line breaks for given files").Bool()

pkg/mdformatter/linktransformer/link.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ func NewValidator(ctx context.Context, logger log.Logger, linksValidateConfig []
258258
}
259259

260260
// Set very soft limits.
261-
// E.g github has 50-5000 https://docs.github.com/en/free-pro-team@latest/rest/reference/rate-limit limit depending
262-
// on api (only search is below 100).
261+
// E.g GitHub has 50-5000 https://docs.github.com/en/free-pro-team@latest/rest/reference/rate-limit limit depending
262+
// on API (only search is below 100).
263263
if config.Timeout != "" {
264264
v.c.SetRequestTimeout(config.timeout)
265265
}
@@ -551,7 +551,7 @@ func (l localLinksCache) addRelLinks(localLink string) error {
551551
func toHeaderID(header []byte) string {
552552
var id []byte
553553
// Remove punctuation from header except '-' or '#'.
554-
// '\p{L}\p{N}\p{M}' is the unicode equivalent of '\w', https://www.regular-expressions.info/unicode.html.
554+
// '\p{L}\p{N}\p{M}' is the Unicode equivalent of '\w', https://www.regular-expressions.info/unicode.html.
555555
punctuation := regexp.MustCompile(`[^\p{L}\p{N}\p{M}-# ]`)
556556
header = punctuation.ReplaceAll(header, []byte(""))
557557
headerText := bytes.TrimLeft(bytes.ToLower(header), "#")

pkg/mdformatter/linktransformer/validator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Validator interface {
1313
IsValid(k futureKey, r *validator) (bool, error)
1414
}
1515

16-
// GitHubPullsIssuesValidator.IsValid skips visiting all github issue/PR links.
16+
// GitHubPullsIssuesValidator.IsValid skips visiting all GitHub issue/PR links.
1717
func (v GitHubPullsIssuesValidator) IsValid(k futureKey, r *validator) (bool, error) {
1818
r.l.githubSkippedLinks.Inc()
1919
// Find rightmost index of match i.e, where regex match ends.
@@ -31,7 +31,7 @@ func (v GitHubPullsIssuesValidator) IsValid(k futureKey, r *validator) (bool, er
3131
return false, nil
3232
}
3333

34-
// RoundTripValidator.IsValid returns true if url is checked by colly or it is a valid local link.
34+
// RoundTripValidator.IsValid returns true if URL is checked by colly or it is a valid local link.
3535
func (v RoundTripValidator) IsValid(k futureKey, r *validator) (bool, error) {
3636
matches := remoteLinkPrefixRe.FindAllStringIndex(k.dest, 1)
3737
if matches == nil && r.validateConfig.ExplicitLocalValidators {

pkg/mdformatter/mdgen/mdgen.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ func (t *genCodeBlockTransformer) TransformCodeBlock(ctx mdformatter.SourceConte
3434
return code, nil
3535
}
3636

37-
infoFiels, err := shellwords.NewParser().Parse(string(infoString))
37+
infoFields, err := shellwords.NewParser().Parse(string(infoString))
3838
if err != nil {
3939
return nil, fmt.Errorf("parsing info string %v: %w", string(infoString), err)
4040
}
4141
infoStringAttr := map[string]string{}
42-
for i, field := range infoFiels {
42+
for i, field := range infoFields {
4343
val := []string{field}
4444
if i := strings.Index(field, "="); i != -1 {
4545
val = []string{field[:i], field[i+1:]}

scripts/build-check-comments.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set -eu
1212
#
1313
# Checks Go code comments if they have trailing period (excludes protobuffers and vendor files).
1414
# Comments with more than 3 spaces at beginning are omitted from the check, example: '// - foo'.
15-
# This does not include top-level commments for funcs and types.
15+
# This does not include top-level comments for funcs and types.
1616
#
1717
# Example:
1818
# func main() {

0 commit comments

Comments
 (0)