Module Bracetax_commands.Link


module Link: sig .. end
Module for handling links.

type kind = [ `generic | `local ] 

type t = {
   kind : kind;
   linkto : string option;
   other_args : string list;
   contents : Buffer.t;
}
val get_kind : string -> [> `generic | `local ] * string
In the returned string, if it is a "local:" link, removes the "local:" part.
val create : ?kind:kind ->
?linkto:string -> ?other_args:string list -> unit -> t
val start : ?url_hook:(string -> string) ->
string list -> [> `link of t ] * (string -> unit)
Start recording a link, it returns the Bracetax_commands.Stack.environment element to put in the stack, and new "output" function to write/record the text of the link.
val stop : t ->
kind * string option * string option
Stop recoring a link, returns the kind of link, the optional target, and the optional link text (already transformed).
val unparse : [< `generic | `local ] -> string option -> string option -> string
Transform back to a Bracetax string (treats the text as pure text).