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