Module

marksy/text

src/marksy/text.pooka

Small tools shared by the two parsing passes. Work in Unicode scalar values when looking for ASCII punctuation, and keep original UTF-8 byte addresses in the line reader. A combining mark must not swallow a Markdown delimiter.

API reference

function

chars

src/marksy/text.pooka:13
chars(value: String) -> List(String)
INFERREDfn(String) -> List(String)

Split into scalar strings, including combining marks as separate entries.

function

run

src/marksy/text.pooka:29
run(values: List(String), character: String) -> Int
INFERREDfn(List(String), String) -> Int

Count identical characters at the head without scanning the remaining text.

function

space

src/marksy/text.pooka:34
space(value: String) -> Bool
INFERREDfn(String) -> Bool

Markdown's ASCII whitespace is deliberately narrower than Unicode trim.

function

trim

src/marksy/text.pooka:38
trim(value: String) -> String
INFERREDfn(String) -> String
function

escape

src/marksy/text.pooka:46
escape(value: String) -> String
INFERREDfn(String) -> String

Escape text and attribute delimiters in one pass over already split chunks.