~/bend-docscommunity

linkify.bend checks

raw source on the hub · import 0xf40d06f265422706966baaec48c3e5f2/linkify.bend as Linkify

bible-linkify surface (pure Bend): protect-aware Markdown walker + plain matcher

4 imports
import Base
import ./route.bend as Route
import ./protect.bend as Prot
import ./parse.bend as P

Types

type SigPh source · line 67 · raw

Data

--- Passage signal ---

type TrPh source · line 105 · raw

Data

--- Trim wrappers: drop lead wrappers, reverse, drop lead (ex-trail), reverse ---

type TcPh source · line 153 · raw

Data

type VisCan source · line 245 · raw

Data

type CandGate source · line 248 · raw

Data

type TwPh source · line 282 · raw

Data

type ExPh source · line 319 · raw

Data

--- Urlish ---

type NaPh source · line 396 · raw

Data

type PlPh source · line 430 · raw

Data

--- Plain linkify ---

type LpGate source · line 609 · raw

Data

type FullHit2 source · line 612 · raw

Data

type MdWalk source · line 675 · raw

Data

--- Markdown walker ---

Definitions

def char1 source · line 7 · raw

@+c:Char -> String

def linkify_parts source · line 10 · raw

@+visible:String -> @+canonical:String -> String

def is_newline source · line 13 · raw

@+c:Char -> Bool

def is_alnum source · line 18 · raw

@+c:Char -> Bool

def is_wrapper_lead source · line 21 · raw

@+c:Char -> Bool

def is_wrapper_trail source · line 36 · raw

@+c:Char -> Bool

def has_signal_go source · line 71 · raw

@fuel:Nat -> @ph:SigPh -> @rest:String -> Bool

def has_passage_signal source · line 101 · raw

@+s:String -> Bool

def is_wrapper_either source · line 109 · raw

@+c:Char -> Bool

def trim_pass_go source · line 112 · raw

@fuel:Nat -> @ph:TrPh -> @rest:String -> String

def trim_pass source · line 135 · raw

@+s:String -> String

def trim_wrappers source · line 138 · raw

@+s:String -> String

def is_colon_dot_dash source · line 142 · raw

@+c:Char -> Bool

--- Candidate take ---

def is_cand_char source · line 147 · raw

@+c:Char -> Bool

def pick_sp source · line 164 · raw

@has_d:Bool -> @+n:Nat -> TcPh

def take_cand_go source · line 171 · raw

@fuel:Nat -> @ph:TcPh -> @+rest:String -> @acc:String -> String

def take_candidate source · line 241 · raw

@+s:String -> String

def cand_pick source · line 252 · raw

@empty:Bool -> @+visible:String -> @+canonical:String -> CandGate

def cand_from source · line 259 · raw

@+visible:String -> @+canonical:String -> CandGate

def try_parse_visible_gated source · line 262 · raw

@g:CandGate -> Maybe<&2, VisCan>

def try_parse_visible source · line 269 · raw

@+visible:String -> Maybe<&2, VisCan>

def drop_last_rev source · line 272 · raw

@rev:String -> String

def drop_last source · line 279 · raw

@s:String -> String

def try_windows_go source · line 288 · raw

@fuel:Nat -> @ph:TwPh -> Maybe<&2, VisCan>

def try_windows source · line 315 · raw

@+raw:String -> Maybe<&2, VisCan>

def expand_token_left source · line 323 · raw

@fuel:Nat -> @ph:ExPh -> @+left_rev:String -> @acc:String -> String

def expand_token_right source · line 346 · raw

@fuel:Nat -> @ph:ExPh -> @+right:String -> @acc:String -> String

def token_around source · line 369 · raw

@+prefix_rev:String -> @+matched:String -> @+suffix:String -> String

def is_urlish_token source · line 378 · raw

@+tok:String -> Bool

def is_book_num source · line 387 · raw

@+c:Char -> Bool

def looks_like_ref_start source · line 393 · raw

@+c:Char -> Bool

def not_alnum_next_go source · line 399 · raw

@ph:NaPh -> Bool

def not_alnum_next source · line 408 · raw

@next_suffix:String -> Bool

def standalone_from_prev source · line 415 · raw

@prev_alnum:Bool -> @+next_suffix:String -> Bool

def standalone_ok source · line 422 · raw

@+prev_rev:String -> @+next_suffix:String -> Bool

def pick_pl_ref source · line 443 · raw

@at_start:Bool -> PlPh

def pick_pl source · line 450 · raw

@is_ref:Bool -> @at_start:Bool -> PlPh

def linkify_plain_go source · line 460 · raw

@fuel:Nat -> @ph:PlPh -> @+rest:String -> @+prev_rev:String -> @out:String -> String

def classify_rest source · line 617 · raw

@exact:Bool -> @+visible:String -> @+canonical:String -> @+rest:String -> FullHit2

def classify_hit source · line 624 · raw

@m:Maybe<&2, VisCan> -> @+text:String -> FullHit2

def linkify_plain_from_hit source · line 638 · raw

@h:FullHit2 -> @+text:String -> String

def linkify_plain_gated source · line 662 · raw

@g:LpGate -> @+text:String -> String

def linkify_plain source · line 671 · raw

@+text:String -> String

def linkify_md_go source · line 683 · raw

@fuel:Nat -> @ph:MdWalk -> @+rest:String -> @plain:String -> @out:String -> String

def linkify_markdown source · line 766 · raw

@+source:String -> String