Restructure as following
This commit is contained in:
@@ -28,8 +28,15 @@ import ../utils/fp
|
||||
|
||||
# -- Parsers
|
||||
|
||||
let linkStartParser* = ignore(str("[[")) + anyUntil(choice(@[str("]["), str("]]")])) + optional(ignore(str("][")))
|
||||
let linkEndParser* = anyUntil(str("]]")) + ignore(str("]]"))
|
||||
let linkStartParser* = following(@[
|
||||
ignore(str("[[")),
|
||||
anyUntil(choice(@[str("]["), str("]]")])),
|
||||
optional(ignore(str("][")))
|
||||
])
|
||||
let linkEndParser* = following(@[
|
||||
anyUntil(str("]]")),
|
||||
ignore(str("]]")),
|
||||
])
|
||||
|
||||
let linkParser* = proc(parser: Parser): ParserResult {.closure.} =
|
||||
# Parse an an org link in the `parser` state.
|
||||
|
||||
Reference in New Issue
Block a user