[markdown] Ignore status tags with upper case letters
related to https://github.com/status-im/status-react/issues/11317
This commit is contained in:
parent
a36144983a
commit
7467ca7b10
2
go.mod
2
go.mod
|
@ -51,7 +51,7 @@ require (
|
|||
github.com/russolsen/transit v0.0.0-20180705123435-0794b4c4505a
|
||||
github.com/status-im/doubleratchet v3.0.0+incompatible
|
||||
github.com/status-im/keycard-go v0.0.0-20200107115650-f38e9a19958e // indirect
|
||||
github.com/status-im/markdown v0.0.0-20201019100609-fdf2b9595723
|
||||
github.com/status-im/markdown v0.0.0-20201022101546-c0cbdd5763bf
|
||||
github.com/status-im/migrate/v4 v4.6.2-status.2
|
||||
github.com/status-im/rendezvous v1.3.0
|
||||
github.com/status-im/status-go/extkeys v1.1.2
|
||||
|
|
4
go.sum
4
go.sum
|
@ -652,8 +652,8 @@ github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48 h1:ju5UTwk5Od
|
|||
github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q=
|
||||
github.com/status-im/keycard-go v0.0.0-20200107115650-f38e9a19958e h1:iT/UJdf+SzbgkIPDe/RmlCfLEQ+ab4UMl6toBl9CGZA=
|
||||
github.com/status-im/keycard-go v0.0.0-20200107115650-f38e9a19958e/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q=
|
||||
github.com/status-im/markdown v0.0.0-20201019100609-fdf2b9595723 h1:knqBM/gX4XxsIpX1clXEl8oMYc5KBcgmdLyZEvMJAMk=
|
||||
github.com/status-im/markdown v0.0.0-20201019100609-fdf2b9595723/go.mod h1:9yR8woqkJIHs3sf9pEjYvaGfmhsXR1leEMAX6+Z5y+M=
|
||||
github.com/status-im/markdown v0.0.0-20201022101546-c0cbdd5763bf h1:0w1mjNUqEHoL8RkcT4VEZ7+wzqQzAVQXZBFqPElkmJk=
|
||||
github.com/status-im/markdown v0.0.0-20201022101546-c0cbdd5763bf/go.mod h1:9yR8woqkJIHs3sf9pEjYvaGfmhsXR1leEMAX6+Z5y+M=
|
||||
github.com/status-im/migrate/v4 v4.6.2-status.2 h1:SdC+sMDl/aI7vUlwD2qj2p7KsK4T60IS9z4/rYCCbI8=
|
||||
github.com/status-im/migrate/v4 v4.6.2-status.2/go.mod h1:c/kc90n47GZu/58nnz1OMLTf7uE4Da4gZP5qmU+A/v8=
|
||||
github.com/status-im/rendezvous v1.3.0 h1:7RK/MXXW+tlm0asKm1u7Qp7Yni6AO29a7j8+E4Lbjg4=
|
||||
|
|
|
@ -670,6 +670,11 @@ func isSpace(c byte) bool {
|
|||
return c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f' || c == '\v'
|
||||
}
|
||||
|
||||
// isLowerCaseLetter returns true if c is ascii lower case letter
|
||||
func isLowerCaseLetter(c byte) bool {
|
||||
return (c >= 'a' && c <= 'z')
|
||||
}
|
||||
|
||||
// isLetter returns true if c is ascii letter
|
||||
func isLetter(c byte) bool {
|
||||
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
|
||||
|
@ -681,8 +686,13 @@ func isAlnum(c byte) bool {
|
|||
return (c >= '0' && c <= '9') || isLetter(c)
|
||||
}
|
||||
|
||||
// isNum returns true if c is a digit
|
||||
func isNum(c byte) bool {
|
||||
return (c >= '0' && c <= '9')
|
||||
}
|
||||
|
||||
func isValidStatusTagChar(c byte) bool {
|
||||
return isAlnum(c) || c == '-'
|
||||
return isNum(c) || isLowerCaseLetter(c) || c == '-'
|
||||
}
|
||||
|
||||
func isValidTerminatingMentionChar(c byte) bool {
|
||||
|
|
|
@ -366,7 +366,7 @@ github.com/status-im/doubleratchet
|
|||
github.com/status-im/go-multiaddr-ethv4
|
||||
# github.com/status-im/keycard-go v0.0.0-20200107115650-f38e9a19958e
|
||||
github.com/status-im/keycard-go/derivationpath
|
||||
# github.com/status-im/markdown v0.0.0-20201019100609-fdf2b9595723
|
||||
# github.com/status-im/markdown v0.0.0-20201022101546-c0cbdd5763bf
|
||||
github.com/status-im/markdown
|
||||
github.com/status-im/markdown/ast
|
||||
github.com/status-im/markdown/parser
|
||||
|
|
Loading…
Reference in New Issue