Module

marksy/inline

src/marksy/inline.pooka

Give code spans and links their boundaries before pairing emphasis runs. Delimiters remember the original neighbours, not the text produced by an entity. A resolved link label has its own delimiter scope: emphasis cannot reach through its brackets to borrow an opener outside.

Pooka
assert inline.parse("an `owl`") == [ast.Text("an "), ast.Code("owl")]

API reference

class

Context

src/marksy/inline.pooka:23
class Context(definitions: List(links.Definition), options: syntax.Options)
field

definitions

src/marksy/inline.pooka:23
definitions: List(links.Definition)
field

options

src/marksy/inline.pooka:23
options: syntax.Options
constructor

new

src/marksy/inline.pooka:23
class

Token

src/marksy/inline.pooka:25
class Token
class

Node

src/marksy/inline.pooka:27
class Node(value: ast.Inline) is Token
field

value

src/marksy/inline.pooka:27
value: ast.Inline
constructor

new

src/marksy/inline.pooka:27
class

Delimiter

src/marksy/inline.pooka:29
class Delimiter(marker: String, count: Int, opens: Bool, closes: Bool) is Token
field

marker

src/marksy/inline.pooka:29
marker: String
INFERREDString
field

count

src/marksy/inline.pooka:29
count: Int
INFERREDInt
field

opens

src/marksy/inline.pooka:29
opens: Bool
INFERREDBool
field

closes

src/marksy/inline.pooka:29
closes: Bool
INFERREDBool
constructor

new

src/marksy/inline.pooka:29
INFERREDfn(String, Int, Bool, Bool) -> marksy/inline.Delimiter
class

Opener

src/marksy/inline.pooka:31
class Opener(value: Delimiter, before: List(Token), between: List(Token))
field

value

src/marksy/inline.pooka:31
value: Delimiter
field

before

src/marksy/inline.pooka:31
before: List(Token)
INFERREDList(marksy/inline.Token)
field

between

src/marksy/inline.pooka:31
between: List(Token)
INFERREDList(marksy/inline.Token)
constructor

new

src/marksy/inline.pooka:31
function

parse

src/marksy/inline.pooka:33
parse(source: String) -> List(ast.Inline)
INFERREDfn(String) -> List(marksy/ast.Inline)
function

parse_with

src/marksy/inline.pooka:39
parse_with(source: String, definitions: List(links.Definition)) -> List(
  ast.Inline
)
INFERREDfn(String, List(marksy/links.Definition)) -> List(marksy/ast.Inline)

Definitions are already collected across the whole document, including child containers. Their order preserves the first-definition-wins rule.

function

parse_configured

src/marksy/inline.pooka:46
parse_configured(
  source: String,
  definitions: List(links.Definition),
  options: syntax.Options
) -> List(ast.Inline)

Parse optional extensions without changing ordinary CommonMark behaviour.