2022-09-16 21:30:29 +09:00
|
|
|
@top Document { heading line* }
|
|
|
|
|
2022-09-17 16:38:41 +09:00
|
|
|
heading { Heading? "\n" }
|
2022-09-17 18:58:07 +09:00
|
|
|
line { Indent* ((AutoLink | Code | word) space*)* "\n" }
|
2022-09-16 21:30:29 +09:00
|
|
|
|
|
|
|
@tokens {
|
|
|
|
space { $[ \t] }
|
2022-09-17 17:04:18 +09:00
|
|
|
word { ![ \t\n]+ }
|
|
|
|
Heading { ![\n]+ }
|
2022-09-16 21:30:29 +09:00
|
|
|
Indent { space }
|
2022-09-17 16:38:41 +09:00
|
|
|
AutoLink { ("http" | "https") "://" word }
|
2022-09-17 18:58:07 +09:00
|
|
|
Code { "`" ![`\n]+ "`" | ($[$%] " ") ![\n]+ }
|
|
|
|
@precedence { AutoLink, Code, word }
|
2022-09-16 21:30:29 +09:00
|
|
|
}
|