Trilium Frontend API
    Preparing search index...

    Class ParserAbstract

    A superclass that parsers should extend.

    Index

    Constructors

    Methods

    • Start a parse for a single tree. This is the method concrete parser implementations must implement. Called by startParse, with the optional arguments resolved.

      Parameters

      • input: Input
      • fragments: readonly TreeFragment[]
      • ranges: readonly { from: number; to: number }[]

      Returns PartialParse

    • Run a full parse, returning the resulting tree.

      Parameters

      • input: string | Input
      • Optionalfragments: readonly TreeFragment[]
      • Optionalranges: readonly { from: number; to: number }[]

      Returns Tree

    • Start a parse, returning a partial parse object. fragments can be passed in to make the parse incremental.

      By default, the entire input is parsed. You can pass ranges, which should be a sorted array of non-empty, non-overlapping ranges, to parse only those ranges. The tree returned in that case will start at ranges[0].from.

      Parameters

      • input: string | Input
      • Optionalfragments: readonly TreeFragment[]
      • Optionalranges: readonly { from: number; to: number }[]

      Returns PartialParse