# Functions
AllNilEntries returns true if all the entries in the given `elements` are `nil`.
Append appends all given elements.
Apply applies the given funcs to transform the given input.
Flatten.
HasAttributeWithValue checks that there is an entry for the given key/value pair.
HasNotAttribute checks that there is no entry for the given key.
InsertAt inserts the given element in the target at the given index (thus moving all following elements by 1).
No description provided by the author
NewAttributeDeclaration initializes a new AttributeDeclaration with the given name and optional value.
NewAttributeReference initializes a new Attribute Reference.
NewAttributeReset initializes a new Document Attribute Resets.
NewAttributes retrieves the ElementID, ElementTitle and ElementInlineLink from the given slice of attributes.
NewBlankLine initializes a new `BlankLine`.
No description provided by the author
NewCallout returns a new Callout with the given reference.
NewCalloutListElement returns a new CalloutListElement.
NewConcealedIndexTerm returns a new ConcealedIndexTerm.
NewCounterSubstitution returns a counter substitution.
No description provided by the author
NewDocumentAuthor initializes a new DocumentAuthor.
No description provided by the author
NewDocumentAuthors converts the given authors into an array of `DocumentAuthor`.
No description provided by the author
No description provided by the author
No description provided by the author
NewDocumentRevision intializes a new DocumentRevision.
NewElementPlaceHolder returns a new ElementPlaceHolder with the given reference.
NewEmailAddressLink creates a new link from an email address.
No description provided by the author
No description provided by the author
No description provided by the author
NewEscapedQuotedText returns a new []interface{} where the nested elements are preserved (ie, substituted as expected).
NewExternalCrossReference initializes a new `InternalCrossReference` from the given ID.
NewFileInclusion initializes a new inline `FileInclusion`.
NewFootnote returns a new Footnote with the given content.
NewFootnotes initializes a new Footnotes.
No description provided by the author
No description provided by the author
NewIcon initializes a new `Icon`.
NewIDAttribute initializes a new attribute map with a single entry for the ID using the given value.
No description provided by the author
No description provided by the author
No description provided by the author
NewImageBlock initializes a new `ImageBlock`.
NewIncludedFileEndTag returns a new IncludedFileEndTag.
NewIncludedFileLine returns a new IncludedFileLine.
NewIncludedFileStartTag returns a new IncludedFileStartTag.
NewIndexTerm returns a new IndexTerm.
NewInlineAnchor initializes a new InlineLink map with a single entry for the ID using the given value.
NewInlineButton initializes a new `InlineButton`.
NewInlineElements initializes a new `InlineElements` from the given values.
NewInlineImage initializes a new `InlineImage` (similar to ImageBlock, but without attributes).
NewInlineLink initializes a new inline `InlineLink`.
NewInlineMenu initializes a new `InlineMenu`.
NewInlinePassthrough returns a new passthrough.
No description provided by the author
NewInlineUserMacro returns an UserMacro.
NewInternalCrossReference initializes a new `InternalCrossReference` from the given ID.
NewLabeledListElement initializes a new LabeledListElement.
No description provided by the author
No description provided by the author
NewLineBreak returns a new line break, that's all.
NewLineRange returns a new line range.
NewLineRanges returns a slice of line ranges attribute for a file inclusion.
No description provided by the author
No description provided by the author
No description provided by the author
NewLocation return a new location with the given elements.
No description provided by the author
No description provided by the author
NewNamedAttribute a named (or positional) element.
No description provided by the author
NewOptionAttribute sets a boolean option.
NewOrderedListElement initializes a new `orderedListItem` from the given content.
NewOrderedListElementPrefix initializes a new OrderedListElementPrefix.
NewParagraph initializes a new `Paragraph`.
NewPositionalAttribute returns a new attribute who key is the position in the group.
NewQuotedText initializes a new `QuotedText` from the given kind and content.
NewRawLine returns a new RawLine wrapper for the given string.
No description provided by the author
NewRoleAttribute initializes a new attribute map with a single entry for the title using the given value.
NewSection returns a new Section.
NewSinglelineComment initializes a new single line content.
NewSpecialCharacter return a new SpecialCharacter.
NewStringElement initializes a new `StringElement` from the given content.
NewSymbol return a new Symbol.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewTagRange returns a new TagRange.
NewTagRanges returns a slice of tag ranges attribute for a file inclusion.
NewThematicBreak returns a new ThematicBreak.
NewTitleAttribute initializes a new attribute map with a single entry for the title using the given value.
NewUnorderedListElement initializes a new `UnorderedListElement` from the given content.
No description provided by the author
NewUnorderedListElementPrefix initializes a new UnorderedListElementPrefix.
NewUserMacroBlock returns an UserMacro.
NewYamlFrontMatter initializes a new FrontMatter from the given `content`.
Reduce merges and returns a string if the given elements only contain a single StringElement (ie, return its `Content`), otherwise return the given elements or empty string if the elements is `nil` or an empty `[]interface{}`.
ReplaceNonAlphanumerics replace all non alpha numeric characters with the given `replacement`.
No description provided by the author
TrimTrailingSpaces trims trailing spaces on the last element (if applicable).
# Constants
TODO: define a `NumberingStyle` type Arabic the arabic numbering (1, 2, 3, etc.).
No description provided by the author
AttrAuthor the key to the author's full name declared as a standalone attribute.
AttrAuthors the key to the authors declared after the section level 0 (at the beginning of the doc).
AttrAutoWidth the `autowidth` attribute on a table.
AttrButtonLabel the label of a button.
AttrCaption is the caption for block images, tables, and so forth.
AttrCautionCaption is the CAUTION caption.
AttrCheckStyle the attribute to mark the first element of an unordered list item as a checked or not.
AttrChromaClassPrefix the class prefix used by Chroma when rendering source code (default: `tok-`).
AttrCols the table columns attribute.
AttrDocType the "description" attribute.
AttrDocType the "doctype" attribute.
AttrAuthor the key to the author's email address declared as a standalone attribute.
AttrExampleCaption is the example caption.
AttrExperimental a flag to enable experiment macros (for UI).
AttrFigureCaption is the figure (image) caption.
AttrFloat is for image or table float (text flows around).
AttrFrame the frame used mostly for tables (all, topbot, sides, none).
AttrGrid the grid (none, all, cols, rows) in tables.
AttrHardBreaks the attribute to set on a paragraph to render with hard breaks on each line.
AttrHeight the image `height` attribute.
AttrIconFlip the icon `flip` attribute, and if set can be "horizontal" or "vertical".
AttrIconRotate the icon `rotate` attribute, and can be one of 90, 180, or 270.
AttrIconSize the icon `size`, and can be one of 1x, 2x, 3x, 4x, 5x, lg, fw.
AttrID the key to retrieve the ID.
AttrIDPrefix the key to retrieve the ID Prefix.
AttrIDSeparator the key to retrieve the ID Separator.
AttrImageAlign is for image alignment.
AttrImageAlt the image `alt` attribute.
AttrImagesDir the `imagesdir` attribute.
AttrImageWindow the `window` attribute, which becomes the target for the link.
AttrImportantCaption is the IMPORTANT caption.
AttrInlineLink the key to retrieve the link.
AttrInlineLinkTarget the 'window' attribute.
AttrInlineLinkText the text attribute (first positional) of links.
AttrInteractive the attribute to mark the first element of an unordered list item as n interactive checkbox or not (paired with `AttrCheckStyle`).
AttrLanguage the `language` attribute for a source block or a source paragraph.
AttrLastUpdated the "last updated" data in the document, i.e., the output/generation time.
AttrLevelOffset the `leveloffset` attribute used in file inclusions.
AttrLineNums the `linenums` attribute for a source block or a source paragraph.
AttrLineRanges the `lines` attribute used in file inclusions.
AttrNoFooter attribute to disable the rendering of document footer.
AttrNoHeader attribute to disable the rendering of document footer.
AttrNoteCaption is the NOTE caption.
AttrNumbered the `numbered` attribute to trigger section numbering at renderding time.
AttrOption the key for a single option attribute.
AttrOptions the key to retrieve the options attribute.
AttrOpts alias for AttrOptions.
AttrPositional1 positional parameter 1.
AttrPositional2 positional parameter 2.
AttrPositional3 positional parameter 3.
AttrPositionalIndex positional parameter index.
AttrQuoteAuthor attribute for the author of a verse.
AttrQuoteTitle attribute for the title of a verse.
AttrRevision the key to the revision declared after the section level 0 (at the beginning of the doc) or as a standalone attribute.
AttrRole the key for a single role attribute.
AttrRoles the key to retrieve the roles attribute.
AttrSectionNumbers the `sectnums` attribute to trigger section numbering at renderding time (an alias for `numbered`).
AttrSource the `source` attribute for a source block or a source paragraph (this is a placeholder, ie, it does not expect any value for this attribute).
AttrStart the `start` attribute in an ordered list.
AttrStripes controls table row background (even, odd, all, none, hover).
AttrStyle paragraph, block or list style.
AttrSubstitutions the "subs" attribute to configure substitutions on delimited blocks and paragraphs.
AttrSyntaxHighlighter the attribute to define the syntax highlighter on code source blocks.
AttrTableCaption is the table caption.
AttrTableOfContents the `toc` attribute at document level.
AttrTableOfContentsLevels the document attribute which specifies the number of levels to display in the ToC.
AttrTableOfContentsTitle the document attribute which specifies the title of the table of contents.
AttrTagRanges the `tag`/`tags` attribute used in file inclusions.
AttrTipCaption is the TIP caption.
AttrCustomID the key to retrieve the flag that indicates if the element ID is custom or generated AttrCustomID = "@customID" AttrTitle the key to retrieve the title.
AttrUnicode local libasciidoc attribute to encode output as UTF-8 instead of ASCII.
AttrVersionLabel labels the version number in the document.
AttrWarningCaption is the TIP caption.
AttrWidth the `width` attribute used ior images, tables, and so forth.
AttrXRefLabel the label of a cross reference.
BlockMacro a block user macro.
No description provided by the author
Caution the 'CAUTION' type of admonition.
Checked when the unordered list item is checked.
CheckedInteractive when the unordered list item is checked (with an interactive checkbox).
Comment a comment block.
Dash an unordered item can begin with a single dash.
DefaultIDPrefix the default ID Prefix.
DefaultIDSeparator the default ID Separator.
No description provided by the author
No description provided by the author
DoubleQuoteBold bold quoted text (wrapped with '**').
DoubleQuoteItalic italic quoted text (wrapped with '__').
DoubleQuoteMarked text highlighter (wrapped '##').
DoubleQuoteMonospace monospace quoted text (wrapped with '``').
No description provided by the author
Example an example block.
Fenced a fenced block.
FiveAsterisks an unordered item marked with five asterisks.
FourAsterisks an unordered item marked with four asterisks.
No description provided by the author
No description provided by the author
default.
No description provided by the author
No description provided by the author
Important the 'IMPORTANT' type of admonition.
InlineMacro a inline user macro.
InvalidFootnoteReference a constant to mark the footnote reference as invalid.
No description provided by the author
Listing a listing block.
Literal a literal block.
LiteralParagraph a literal parsgraph.
No description provided by the author
LowerAlpha the lower-alpha numbering (a, b, c, etc.).
LowerRoman the lower-roman numbering (i, ii, iii, etc.).
MarkdownCode a code block in the Markdown style.
MarkdownQuote a quote block in the Markdown style.
No description provided by the author
NoCheck when the unodered list item has no specific check annotation.
Note the 'NOTE' type of admonition.
OneAsterisk an unordered item marked with a single asterisk.
Open an Open block.
No description provided by the author
Passthrough a passthrough block.
PassthroughMacro a passthrough with the `pass:[]` macro.
No description provided by the author
Quote a quote block.
Sidebar a sidebar block.
SinglePlusPassthrough a passthrough with a single `+` punctuation.
SingleQuoteBold bold quoted text (wrapped with '*').
SingleQuoteItalic italic quoted text (wrapped with '_').
SingleQuoteMarked text highlighter (wrapped with '#').
SingleQuoteMonospace monospace quoted text (wrapped with '`').
SingleQuoteSubscript subscript quoted text (wrapped with '~').
SingleQuoteSuperscript superscript quoted text (wrapped with '^').
Source a source block.
No description provided by the author
ThreeAsterisks an unordered item marked with three asterisks.
Tip the 'TIP' type of admonition.
No description provided by the author
TriplePlusPassthrough a passthrough with a triple `+++` punctuation.
TwoAsterisks an unordered item marked with two asterisks.
Unchecked when the unordered list item is not checked.
UncheckedInteractive when the unordered list item is not checked (with an interactive checkbox).
No description provided by the author
UpperAlpha the upper-alpha numbering (A, B, C, etc.).
UpperRoman the upper-roman numbering (I, II, III, etc.).
No description provided by the author
No description provided by the author
No description provided by the author
default.
Verse a verse block.
Warning the 'WARNING' type of admonition.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
Attribute is a key/value pair wrapper.
AttributeDeclaration the type for Document Attribute Declarations.
AttributeReference the type for AttributeReference.
AttributeReset the type for AttributeReset.
BlankLine the structure for the empty lines, which are used to separate logical blocks.
No description provided by the author
Callout a reference at the end of a line in a delimited block with verbatim content (eg: listing, source code).
CalloutListElement the description of a call out which will appear as an ordered list item after the delimited block.
ConcealedIndexTerm a concealed index term, with 1 required and 2 optional terms.
CounterSubstitution is a counter, that may increment when it is substituted.
CurrentTagRange a tag range found while processing a document.
DelimitedBlock the structure for the Listing blocks.
Document the top-level structure for a document.
DocumentAuthor a document author.
No description provided by the author
No description provided by the author
DocumentFragment a single fragment of document.
No description provided by the author
DocumentRevision a document revision.
ElementPlaceHolder a placeholder for elements which may have been parsed during previous substitution, and which are substituted with a placeholder while serializing the content to parse with the "macros" substitution.
No description provided by the author
ExternalCrossReference the struct for Cross References.
FileInclusion the structure for the file inclusions.
Footnote a foot note, without or without explicit reference (an explicit reference is used to refer multiple times to the same footnote across the document).
FootnoteReference a footnote reference.
Footnotes the footnotes of a document.
FrontMatter the structure for document front-matter.
Icon an icon.
No description provided by the author
No description provided by the author
No description provided by the author
ImageBlock the structure for the block images.
IncludedFileEndTag the type for the `end::` macro.
IncludedFileStartTag the type for the `tag::` macro.
IndexTerm a index term, with a single term.
InlineButton a button (requires `experimental` doc attribute to be set).
InlineImage the structure for the inline image macros.
InlineLink the structure for the external links.
InlineMenu a menu with optional subpaths defined in its attributes (requires `experimental` doc attribute to be set).
InlinePassthrough the structure for Passthroughs.
InternalCrossReference the struct for Cross References.
LabeledListElement an item in a labeled.
LineBreak an explicit line break in a paragraph.
LineRange the range of lines of the child doc to include in the master doc `Start` and `End` are the included limits of the child document - if there's a single line to include, then `End = Start` - if there is all remaining content after a given line (included), then `End = -1`.
No description provided by the author
No description provided by the author
No description provided by the author
Location a Location contains characters and optionaly, document attributes.
Metadata the document metadata returned after the rendering.
OrderedListElement the structure for the ordered list items.
OrderedListElementPrefix the prefix used to construct an OrderedListElement.
Paragraph the structure for the paragraphs.
No description provided by the author
PositionalAttribute an attribute whose key will be determined by its position, and which depends on the element it applies to.
Preamble the structure for document Preamble.
QuotedText the structure for quoted text.
------------------------------------------------------------------------------------- Raw Line -------------------------------------------------------------------------------------.
RawSection the structure for a rawText section, using during preparsing (needed to support level offsets).
Section the structure for a section.
SinglelineComment a single line comment.
SpecialCharacter a special character, which may get a special treatment later during rendering Eg `<`, `>`, `&`.
StringElement the structure for strings.
Symbol a sequence of characters, which may get a special treatment later during rendering Eg: `(C)`, `(TM)`, `...`, etc.
Table the structure for the tables.
No description provided by the author
No description provided by the author
TableOfContents the table of contents.
TableOfContentsPlaceHolder a place holder for Table of Contents, so the renderer knows when to render it.
TableRow a table line is made of columns, each column being a group of []interface{} (to support quoted text, etc.).
TagRange the range to include or exclude from the file inclusion.
ThematicBreak a thematic break.
ToCSection a section in the table of contents.
UnorderedListElement the structure for the unordered list items.
UnorderedListElementPrefix the prefix used to construct an UnorderedListElement.
UserMacro the structure for User Macro.
# Interfaces
No description provided by the author
DocumentElement a document element can have attributes.
No description provided by the author
ListElement a list item.
No description provided by the author
WithAttributes base interface for types on which attributes can be substituted.
No description provided by the author
No description provided by the author
WithFootnotes interface for all types which may contain footnotes.
No description provided by the author
No description provided by the author
# Type aliases
Attributes the element attributes a map[string]interface{} with some utility methods.
No description provided by the author
CurrentRanges the current ranges, ie, as they are "discovered" while processing one line at a time in the file to include.
No description provided by the author
ElementReferences the element references in the document.
No description provided by the author
No description provided by the author
IncludedFileLine a line, containing rawText text and inclusion tags.
No description provided by the author
LineRanges the ranges of lines of the child doc to include in the master doc.
No description provided by the author
MacroKind the type of user macro.
No description provided by the author
PassthroughKind the kind of passthrough.
PredefinedAttribute a special kind of attribute substitution, which uses a predefined attribute.
QuotedTextKind the type for.
ReduceOption an option to apply on the reduced content when it is a `string`.
No description provided by the author
No description provided by the author
TagRanges the ranges of tags of the child doc to include in the master doc.
UnorderedListElementBulletStyle the type of bullet for items in an unordered list.
UnorderedListElementCheckStyle the check style that applies on an unordered list item.
No description provided by the author