Browse Source
Fine tune the mention regex with unicode classes
Now it matches [[urza's rage]], [[Übermäßiges Wachstum]], and the like.
pull/267/head
Víctor Cuadrado Juan
6 years ago
No known key found for this signature in database
GPG Key ID: 223F15CA5AAF0E78
1 changed files with
1 additions and
1 deletions
-
src/github.com/matrix-org/go-neb/services/mtgcard/mtgcard.go
|
|
@ -20,7 +20,7 @@ import ( |
|
|
|
const ServiceType = "mtgcard" |
|
|
|
|
|
|
|
// Matches [[ then word separated with spaces then ]]. E.g "[[card Name]]
|
|
|
|
var cardRegex = regexp.MustCompile(`\[\[\w+(\s*\w+)*\]\]`) |
|
|
|
var cardRegex = regexp.MustCompile(`\[\[[\p{L}|\p{Po}+|\s*]+\]\]`) |
|
|
|
|
|
|
|
type scryfallSearch struct { |
|
|
|
Name string `json:"name"` |
|
|
|