Skip to content

Commit

Permalink
doc: Update embedmd regular expressions so that GitHub hides them cor…
Browse files Browse the repository at this point in the history
…rectly
  • Loading branch information
peterhellberg committed Sep 1, 2023
1 parent 51d820a commit 0ef0cb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import "github.com/sqids/sqids-go"
Simple encode & decode:

[embedmd]:# (examples/sqids-encode-decode/sqids-encode-decode.go /(.+)sqids.New/ /\[1, 2, 3\]/)
[embedmd]:# (examples/sqids-encode-decode/sqids-encode-decode.go /.+sqids.New/ /\[1, 2, 3\]/)
```go
s, _ := sqids.New()
id, _ := s.Encode([]uint64{1, 2, 3}) // "8QRLaD"
Expand All @@ -61,7 +61,7 @@ Simple encode & decode:
Randomize IDs by providing a custom alphabet:

[embedmd]:# (examples/sqids-custom-alphabet/sqids-custom-alphabet.go /(.+)sqids.New/ /\[1, 2, 3\]/)
[embedmd]:# (examples/sqids-custom-alphabet/sqids-custom-alphabet.go /.+sqids.New/ /\[1, 2, 3\]/)
```go
s, _ := sqids.New(sqids.Options{
Alphabet: "FxnXM1kBN6cuhsAvjW3Co7l2RePyY8DwaU04Tzt9fHQrqSVKdpimLGIJOgb5ZE",
Expand All @@ -72,7 +72,7 @@ Randomize IDs by providing a custom alphabet:

Enforce a *minimum* length for IDs:

[embedmd]:# (examples/sqids-minimum-length/sqids-minimum-length.go /(.+)sqids.New/ /\[1, 2, 3\]/)
[embedmd]:# (examples/sqids-minimum-length/sqids-minimum-length.go /.+sqids.New/ /\[1, 2, 3\]/)
```go
s, _ := sqids.New(sqids.Options{
MinLength: 10,
Expand All @@ -83,7 +83,7 @@ Enforce a *minimum* length for IDs:

Prevent specific words from appearing anywhere in the auto-generated IDs:

[embedmd]:# (examples/sqids-blocklist/sqids-blocklist.go /(.+)sqids.New/ /\[1, 2, 3\]/)
[embedmd]:# (examples/sqids-blocklist/sqids-blocklist.go /.+sqids.New/ /\[1, 2, 3\]/)
```go
s, _ := sqids.New(sqids.Options{
Blocklist: []string{"word1", "word2"},
Expand Down

0 comments on commit 0ef0cb1

Please sign in to comment.