[parsing] Support mentions of unicode usernames
This commit is contained in:
parent
35153a9080
commit
cc161f1b32
1 changed files with 3 additions and 2 deletions
|
@ -110,6 +110,7 @@ module private MfmParser =
|
||||||
let isNotWhitespace c = Char.IsWhiteSpace c = false
|
let isNotWhitespace c = Char.IsWhiteSpace c = false
|
||||||
|
|
||||||
let isAsciiLetterOrNumber c = Char.IsAsciiLetter c || Char.IsDigit c
|
let isAsciiLetterOrNumber c = Char.IsAsciiLetter c || Char.IsDigit c
|
||||||
|
let isLetterOrNumber c = Char.IsLetterOrDigit c
|
||||||
|
|
||||||
let (|CharNode|MfmNode|) (x: MfmNode) =
|
let (|CharNode|MfmNode|) (x: MfmNode) =
|
||||||
if x :? MfmCharNode then
|
if x :? MfmCharNode then
|
||||||
|
@ -231,9 +232,9 @@ module private MfmParser =
|
||||||
previousCharSatisfiesNot isNotWhitespace
|
previousCharSatisfiesNot isNotWhitespace
|
||||||
>>. skipString "@"
|
>>. skipString "@"
|
||||||
>>. many1Chars (
|
>>. many1Chars (
|
||||||
satisfy isAsciiLetterOrNumber
|
satisfy isLetterOrNumber
|
||||||
<|> pchar '_'
|
<|> pchar '_'
|
||||||
<|> attempt (anyOf ".-" .>> nextCharSatisfies isAsciiLetterOrNumber)
|
<|> attempt (anyOf ".-" .>> nextCharSatisfies isLetterOrNumber)
|
||||||
)
|
)
|
||||||
.>>. opt (skipChar '@' >>. domain)
|
.>>. opt (skipChar '@' >>. domain)
|
||||||
.>> (lookAhead
|
.>> (lookAhead
|
||||||
|
|
Loading…
Add table
Reference in a new issue