mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-01 15:03:11 +02:00
URL highlighting with inline CM
This commit is contained in:
30
src-web/components/Editor/url/url.grammar
Normal file
30
src-web/components/Editor/url/url.grammar
Normal file
@@ -0,0 +1,30 @@
|
||||
@top url { Protocol Host Path Query }
|
||||
|
||||
Protocol {
|
||||
ProtocolName Slashy
|
||||
}
|
||||
|
||||
Path {
|
||||
(Slash PathSegment)*
|
||||
}
|
||||
|
||||
Query {
|
||||
Question (QueryPair)*
|
||||
}
|
||||
|
||||
QueryPair {
|
||||
Amp? QueryName Equal QueryValue
|
||||
}
|
||||
|
||||
@tokens {
|
||||
ProtocolName { "http" | "https" }
|
||||
Host { $[a-zA-Z0-9-_.]+ }
|
||||
QueryName { $[a-zA-Z0-9-_.]+ }
|
||||
QueryValue { $[a-zA-Z0-9-_.]+ }
|
||||
PathSegment { $[a-zA-Z0-9-_.]+ }
|
||||
Slashy { "://" }
|
||||
Slash { "/" }
|
||||
Question { "?" }
|
||||
Equal { "=" }
|
||||
Amp { "&" }
|
||||
}
|
||||
Reference in New Issue
Block a user