bobzhang/asciidoctor/core does not have a README file
pub(open) trait Converter {
fn convert(Self, Node, String) -> String
fn backend_traits(Self) -> BackendTraits
}pub(open) trait SyntaxHighlighter {
fn name(Self) -> String
fn handles_highlighting(Self) -> Bool = _
fn highlight(Self, Node, String, String?, HighlightOptions) -> (String, Int?) = _
fn format(Self, Node, String?, FormatOptions) -> String = _
fn has_docinfo(Self, String) -> Bool = _
fn docinfo(Self, String, Node, DocinfoOptions) -> String = _
fn writes_stylesheet(Self, Node) -> Bool = _
fn write_stylesheet(Self, Node) -> Array[(String, String)] = _
}pub(open) trait Vfs {
fn read(Self, String) -> Bytes?
fn is_file(Self, String) -> Bool
fn is_dir(Self, String) -> Bool
fn cwd(Self) -> String
fn home(Self) -> String
}pub(all) suberror ArgumentError {
ArgumentError(String)
}impl Show for ArgumentErrorpub(all) suberror ProcessingError {
MissingConverter(String)
ConversionFailed(String)
}impl Show for ProcessingErrorpub(all) struct Author {
name : String?
firstname : String?
middlename : String?
lastname : String?
initials : String?
email : String?
} derive(Debug)pub(all) struct BackendTraits {
basebackend : String
filetype : String
htmlsyntax : String?
outfilesuffix : String
supports_templates : Bool
} derive(Debug)pub(all) struct BlockMacroProcessor {
name : String
config : ExtensionConfig
process : (Node, String, Attributes) -> Node? raise
}pub(all) struct BlockProcessor {
name : String
config : ExtensionConfig
process : (Node, Reader, Attributes) -> Node? raise
}pub struct Callouts {
// private fields
}pub struct CellData {
text : String
colspan : Int?
rowspan : Int?
inner_document : Node?
// private fields
}pub(all) struct ColSpec {
width : Int
halign : String?
valign : String?
style : String?
} derive(Debug)pub(all) struct Compliance {
block_terminates_paragraph : Bool
strict_verbatim_paragraphs : Bool
underline_style_section_titles : Bool
unwrap_standalone_preamble : Bool
attribute_missing : String
attribute_undefined : String
shorthand_property_syntax : Bool
natural_xrefs : Bool
unique_id_start_index : Int
markdown_syntax : Bool
}impl Converter for CompositeConverterfn CompositeConverter::new(delegate : &Converter, handlers? : Map[String, (Node) -> String]) -> CompositeConverterpub(all) enum Context {
Document
Section
Preamble
Paragraph
Admonition
Listing
Literal
Example
Sidebar
Quote
Verse
Open
Pass
Stem
Image
Audio
Video
ThematicBreak
PageBreak
FloatingTitle
Toc
Ulist
Olist
Dlist
Colist
ListItem
Table
TableCell
TableColumn
Anchor
Break
Button
Callout
Footnote
Indexterm
Kbd
Menu
Quoted
Source
FencedCode
Comment
Abstract
PartIntro
LatexMath
AsciiMath
Custom(String)
} derive(Eq, Hash, Debug)pub(all) struct DocTitle {
main : String
subtitle : String?
combined : String
sanitized : Bool
} derive(Debug)pub(all) struct DocinfoOptions {
linkcss : Bool
cdn_base_url : String
self_closing_tag_slash : String
}fn DocinfoOptions::new(linkcss? : Bool, cdn_base_url? : String, self_closing_tag_slash? : String) -> DocinfoOptionsfn ExtensionConfig::new(content_model? : ContentModel, positional_attrs? : Array[String], default_attrs? : Array[(String, String)], contexts? : Array[Context], format? : String, regexp? : Regex) -> ExtensionConfigfn Extensions::block(self : Extensions, name : String, process : (Node, Reader, Attributes) -> Node? raise, contexts? : Array[Context], content_model? : ContentModel, positional_attrs? : Array[String], default_attrs? : Array[(String, String)]) -> Unitfn Extensions::block_macro(self : Extensions, name : String, process : (Node, String, Attributes) -> Node? raise, content_model? : ContentModel, positional_attrs? : Array[String], default_attrs? : Array[(String, String)]) -> Unit raise ArgumentErrorfn Extensions::docinfo_processor(self : Extensions, process : (Node) -> String? raise, location? : String, prefer? : Bool) -> Unitfn Extensions::include_processor(self : Extensions, process : (Node, Reader, String, Attributes) -> Unit raise, handles? : (Node, String) -> Bool, prefer? : Bool) -> Unitfn Extensions::inline_macro(self : Extensions, name : String, process : (Node, String, Attributes) -> InlineResult? raise, format? : String, regexp? : Regex, content_model? : ContentModel, positional_attrs? : Array[String], default_attrs? : Array[(String, String)]) -> Unit raise ArgumentErrorfn Extensions::postprocessor(self : Extensions, process : (Node, String) -> String raise, prefer? : Bool) -> Unitfn Extensions::preprocessor(self : Extensions, process : (Node, Reader) -> Reader? raise, prefer? : Bool) -> Unitfn Extensions::tree_processor(self : Extensions, process : (Node) -> Node? raise, prefer? : Bool) -> Unitpub(all) struct FormatOptions {
nowrap : Bool
css_mode : String?
style : String?
}fn HighlightOptions::new(callouts? : Map[Int, Array[(AttrVal, String)]], css_mode? : String, highlight_lines? : Array[Int], number_lines? : String, start_line_number? : Int, style? : String) -> HighlightOptionspub(all) struct IncludeProcessor {
handles : (Node, String) -> Bool
process : (Node, Reader, String, Attributes) -> Unit raise
}pub(all) struct InlineMacroProcessor {
name : String
config : ExtensionConfig
process : (Node, String, Attributes) -> InlineResult? raise
}pub(all) struct Node {
context : Context
node_name : String
attributes : Attributes
id : String?
blocks : Array[Node]
content_model : ContentModel
level : Int
numeral : String?
source_location : Cursor?
style : String?
subs : Array[Sub]
lines : Array[String]
index : Int
sectname : String?
special : Bool
numbered : Numbered
marker : String?
dlist_items : Array[DlistItem]
inline_type : String?
target : String?
// private fields
}fn Node::new_block(parent : Node, context : Context, content_model? : ContentModel, subs? : BlockSubs, source? : Array[String], source_text? : String, attributes? : Attributes) -> Nodefn Node::new_inline(parent : Node, context : Context, text? : String, id? : String, type_? : String, target? : String, attributes? : Attributes) -> Nodefn Node::new_section(parent : Node?, level? : Int, numbered? : Bool, attributes? : Attributes) -> Nodefn Node::normalize_asset_path(self : Node, asset_ref : String, asset_name? : String, autocorrect? : Bool) -> String raise SecurityErrorfn Node::normalize_system_path_checked(self : Node, target : String, start? : String, jail? : String, target_name? : String, recover? : Bool) -> String raise SecurityErrorfn Node::parse_attributes(self : Node, attrlist : String, posattrs : Array[String?], unescape_input? : Bool, sub_input? : Bool, sub_result? : Bool, into? : Attributes) -> Attributespub struct NullVfs {
// private fields
}pub(all) struct Options {
attributes : Array[(String, AttrVal)]
safe : Int?
backend : String?
doctype : String?
standalone : Bool?
base_dir : String?
to_file : String?
to_dir : String?
mkdirs : Bool
sourcemap : Bool
parse_header_only : Bool
catalog_assets : Bool
parse : Bool
input_mtime : Int64?
converter : &Converter?
extensions : Extensions?
vfs : &Vfs?
timings : Timings?
syntax_highlighter_factory : (String, String, Node) -> &SyntaxHighlighter??
parent : Node?
cursor : Cursor?
}fn Options::new(attributes? : Array[(String, AttrVal)], safe? : Int, backend? : String, doctype? : String, standalone? : Bool, base_dir? : String, to_file? : String, to_dir? : String, mkdirs? : Bool, sourcemap? : Bool, parse_header_only? : Bool, catalog_assets? : Bool, parse? : Bool, converter? : &Converter, extensions? : Extensions, vfs? : &Vfs, timings? : Timings) -> Optionspub struct PathResolver {
working_dir : String
// private fields
}fn PathResolver::partition_path(self : PathResolver, path : String, web? : Bool) -> (Array[String], String?)fn PathResolver::system_path(self : PathResolver, target : String?, start? : String, jail? : String, target_name? : String, recover? : Bool) -> String raise SecurityErrorpub struct Reader {
source_lines : Array[String]
process_lines : Bool
unterminated : Bool
// private fields
}fn Reader::push_include_lines(self : Reader, data : Array[String], file? : String, path? : String, lineno? : Int, attributes? : Attributes) -> Unitfn Reader::read_lines_until(self : Reader, terminator? : String, skip_processing? : Bool, break_on_blank_lines? : Bool, break_on_list_continuation? : Bool, skip_line_comments? : Bool, skip_first_line? : Bool, read_last_line? : Bool, preserve_last_line? : Bool, context? : String?, cursor? : Cursor, cursor_at_mark? : Bool, break_if? : (String) -> Bool) -> Array[String]pub struct Timings {
// private fields
}test {
let t = @core.Timings::new(() => 0.0)
t.set("read", 0.00001)
t.set("parse", 0.00003)
t.set("convert", 0.00005)
inspect(
t.report(subject="doc.adoc"),
content=(
#|Input file: doc.adoc
#| Time to read and parse source: 0.00004
#| Time to convert document: 0.00005
#| Total time (read, parse and convert): 0.00009
#|
),
)
}fn base64_encode(data : Bytes) -> Stringfn basename(filename : String, drop_ext? : Bool) -> Stringfn create_anchor(parent : Node, text : String?, type_ : String, target? : String, id? : String, attributes? : Attributes) -> Nodefn create_block(parent : Node, context : Context, source : Array[String]?, attrs : Attributes, content_model? : ContentModel, subs? : BlockSubs) -> Nodefn create_inline(parent : Node, context : Context, text : String?, type_? : String, target? : String, id? : String, attributes? : Attributes) -> Nodefn create_section(parent : Node, title : String, attrs : Attributes, level? : Int, numbered? : Bool) -> Nodefn decode_text(data : Bytes) -> Stringfn decode_text_with(data : Bytes, encoding : String?) -> Stringfn encode_uri_component(str : String) -> Stringfn expand_path_from(cwd : String, path : String) -> Stringfn extname(path : String, fallback? : String) -> Stringfn format_source(pre_class : String, node : Node, lang : String?, nowrap : Bool, pre_style? : String) -> Stringfn is_uriish(str : String) -> Boolfn parse_attribute_list(source : String, positional_attrs? : Array[String?], block? : Node, delimiter? : String) -> Attributesfn parse_extension_attributes(block : Node, attrlist : String, positional_attributes? : Array[String], sub_attributes? : Bool) -> Attributeslet primary_stylesheet_data : Stringfn regex_escape(s : String) -> Stringfn register_syntax_highlighter(names : Array[String], factory : (String, String, Node) -> &SyntaxHighlighter?) -> Unitfn rootname(filename : String) -> Stringfn safe_mode_value_for_name(name : String) -> Int?fn set_now_epoch(f : () -> Int64) -> Unitfn set_source_date_epoch(epoch : Int64?) -> Unitfn set_utc_offset(offset : (Int64) -> Int) -> Unitfn sub_placeholder(format : String, arg : String) -> Stringfn sub_specialchars(text : String) -> Stringfn unregister_all_global_extensions() -> UnitInstall
Download zipA port of Asciidoctor (AsciiDoc processor) to MoonBit
Dependencies