Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DataPlugin

The DataPlugin parses Argdown YAML front matter and YAML data of statements, arguments, headings or inferences. In the ParserPlugin the Argdown lexer treats these sections as single tokens so that their contents are ignored by the Argdown parser. Instead the YAML parsing is done afterwards in this plugin by traversing the produced AST and using the js-yaml parser for parsing the content of the FrontMatter and Data tokens.

The parsed data is added to the AST nodes and the data model elements it is meant for. If multiple data sections exist for the same argument or equivalence class, the data is merged in order of appearance (last wins).

The front matter data is added to the topmost AST argdown node and to the [[IDataResponse.frontMatter]] response property. By default (or if response.data.mergeFrontMatterIntoRequest is true) the front matter is also merged into the request object so that it can be used to configure subsequent plugins.

Depends on data of: ParserPlugin

Hierarchy

  • DataPlugin

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

defaults

defaults: IDataSettings

name

name: string = "DataPlugin"

tokenListeners

tokenListeners: object

Type declaration

Methods

getSettings

prepare

  • prepare(request: IArgdownRequest): void

Generated using TypeDoc