Options
All
  • Public
  • Public/Protected
  • All
Menu

Module index

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

DefaultSettings

DefaultSettings<T>: {[ K in keyof T]: DefaultSettingValue<T[K]> }

Type parameters

  • T

IAstNode

IAstNode: IRuleNode | ITokenNode

A node in the abstract syntax tree produced by the ParserPlugin

MapNodeType

The ArgdownTypes members identifying nodes in an argument map.

RelationMember

The data types that can be either source or target of a relation.

Note that IInference can only be a relation target and never be a relation source.

Variables

Const ArgumentDefinition

ArgumentDefinition: TokenType = ...

Const ArgumentMention

ArgumentMention: TokenType = ...

Const ArgumentReference

ArgumentReference: TokenType = ...

Const AsteriskBoldEnd

AsteriskBoldEnd: TokenType = ...

Const AsteriskBoldStart

AsteriskBoldStart: TokenType = ...

Const AsteriskItalicEnd

AsteriskItalicEnd: TokenType = ...

Const AsteriskItalicStart

AsteriskItalicStart: TokenType = ...

Const Comment

Comment: TokenType = ...

Const Contradiction

Contradiction: TokenType = ...

Const Data

Data: TokenType = ...

Const Dedent

Dedent: TokenType = ...

Const EOF

EOF: TokenType = ...

Const Emptyline

Emptyline: TokenType = ...

Const EscapedChar

EscapedChar: TokenType = ...

Const Freestyle

Freestyle: TokenType = ...

Const FrontMatter

FrontMatter: TokenType = ...

Const HeadingStart

HeadingStart: TokenType = ...

Const IncomingAttack

IncomingAttack: TokenType = ...

Const IncomingSupport

IncomingSupport: TokenType = ...

Const IncomingUndercut

IncomingUndercut: TokenType = ...

Const Indent

Indent: TokenType = ...

Const InferenceEnd

InferenceEnd: TokenType = ...

Const InferenceStart

InferenceStart: TokenType = ...

Const Link

Link: TokenType = ...

Const ListDelimiter

ListDelimiter: TokenType = ...

Const Newline

Newline: TokenType = ...

Const OrderedListItem

OrderedListItem: TokenType = ...

Const OutgoingAttack

OutgoingAttack: TokenType = ...

Const OutgoingSupport

OutgoingSupport: TokenType = ...

Const OutgoingUndercut

OutgoingUndercut: TokenType = ...

Const Spaces

Spaces: TokenType = ...

Const SpecialChar

SpecialChar: TokenType = ...

Const StatementDefinition

StatementDefinition: TokenType = ...

Const StatementMention

StatementMention: TokenType = ...

Const StatementNumber

StatementNumber: TokenType = ...

Const StatementReference

StatementReference: TokenType = ...

Const Tag

Tag: TokenType = ...

Const UnderscoreBoldEnd

UnderscoreBoldEnd: TokenType = ...

Const UnderscoreBoldStart

UnderscoreBoldStart: TokenType = ...

Const UnderscoreItalicEnd

UnderscoreItalicEnd: TokenType = ...

Const UnderscoreItalicStart

UnderscoreItalicStart: TokenType = ...

Const UnorderedListItem

UnorderedListItem: TokenType = ...

Const UnusedControlChar

UnusedControlChar: TokenType = ...

Const ensure

ensure: { array: (defaultValue: any[]) => { merge: (incoming: any) => any[] }; boolean: (defaultValue: boolean) => { merge: (incoming: any) => boolean }; number: (defaultValue: number) => { merge: (incoming: any) => number }; object: <T>(defaultValue: T) => { merge: (incoming: any) => T }; string: (defaultValue: string) => { merge: (incoming: any) => string } } = ...

Sanitization methods for config settings. These can be used for simple type checking and overwriting config settings.

Plugins should use these methods together with mergeDefaults.

Type declaration

  • array: (defaultValue: any[]) => { merge: (incoming: any) => any[] }
      • (defaultValue: any[]): { merge: (incoming: any) => any[] }
      • Parameters

        • defaultValue: any[]

        Returns { merge: (incoming: any) => any[] }

        • merge: (incoming: any) => any[]
            • (incoming: any): any[]
            • Parameters

              • incoming: any

              Returns any[]

  • boolean: (defaultValue: boolean) => { merge: (incoming: any) => boolean }
      • (defaultValue: boolean): { merge: (incoming: any) => boolean }
      • Parameters

        • defaultValue: boolean

        Returns { merge: (incoming: any) => boolean }

        • merge: (incoming: any) => boolean
            • (incoming: any): boolean
            • Parameters

              • incoming: any

              Returns boolean

  • number: (defaultValue: number) => { merge: (incoming: any) => number }
      • (defaultValue: number): { merge: (incoming: any) => number }
      • Parameters

        • defaultValue: number

        Returns { merge: (incoming: any) => number }

        • merge: (incoming: any) => number
            • (incoming: any): number
            • Parameters

              • incoming: any

              Returns number

  • object: <T>(defaultValue: T) => { merge: (incoming: any) => T }
      • <T>(defaultValue: T): { merge: (incoming: any) => T }
      • Type parameters

        • T

        Parameters

        • defaultValue: T

        Returns { merge: (incoming: any) => T }

        • merge: (incoming: any) => T
            • (incoming: any): T
            • Parameters

              • incoming: any

              Returns T

  • string: (defaultValue: string) => { merge: (incoming: any) => string }
      • (defaultValue: string): { merge: (incoming: any) => string }
      • Parameters

        • defaultValue: string

        Returns { merge: (incoming: any) => string }

        • merge: (incoming: any) => string
            • (incoming: any): string
            • Parameters

              • incoming: any

              Returns string

Const parser

parser: ArgdownParser = ...

Const shortcodes

shortcodes: ISpecialCharacterDictionary = ...

Const tokenList

tokenList: chevrotain.TokenType[] = ...

Functions

Const addLineBreaks

  • addLineBreaks(str: string, measurePixelWidth: boolean, options: { applyRanges?: undefined | IRange[]; bold?: undefined | boolean; charactersInLine?: undefined | number; escapeAsHtmlEntities?: undefined | boolean; font?: undefined | string; fontSize?: undefined | number; lineBreak?: undefined | string; maxWidth?: undefined | number }): { lines: number; text: string }
  • Adds line breaks to a string every x pixels, using string-pixel-width for measuring the width.

    Returns an object containing the new string and the number of lines.

    Only fonts measured by the string-pixel-width library are supported.

    Parameters

    • str: string
    • measurePixelWidth: boolean
    • options: { applyRanges?: undefined | IRange[]; bold?: undefined | boolean; charactersInLine?: undefined | number; escapeAsHtmlEntities?: undefined | boolean; font?: undefined | string; fontSize?: undefined | number; lineBreak?: undefined | string; maxWidth?: undefined | number }
      • Optional applyRanges?: undefined | IRange[]
      • Optional bold?: undefined | boolean
      • Optional charactersInLine?: undefined | number
      • Optional escapeAsHtmlEntities?: undefined | boolean
      • Optional font?: undefined | string
      • Optional fontSize?: undefined | number
      • Optional lineBreak?: undefined | string
      • Optional maxWidth?: undefined | number

    Returns { lines: number; text: string }

    • lines: number
    • text: string

Const arrayIsEmpty

  • arrayIsEmpty(x: any): boolean

Const astToJsonString

  • astToJsonString(ast: IAstNode[]): string

Const astToString

Const checkResponseFields

Const createMissingResponseFieldError

Const deriveImplicitRelations

  • Derives implicit relations from defined equivalence classes and argument premise-conclusion-structures. This will not derive all logically derivable relations, but only those that directly result from equivalence classes being used as premises or main conclusions in arguments:

    Examples: if ec is used as premise in a: derives support of ec for a if ec is used as main conclusion in a: derives support of a for ec if ec attacks/supports a1 and is used as main conclusion in a2: derives attack/support of a2 for a1 if ec1 is contrary/contradictory to ec2, ec1 is used as premise in a1 and ec2 is used as main conclusion in a2: derives attacks of a2 against ec1 and a1.

    Parameters

    • member: RelationMember

      the relation member (argument, equivalence class, inference) for which the implicit relations should be derived

    • statementsMap: {}

      the statements field of the ArgdownResponse

    • argumentsMap: {}

      the arguments field of the ArgdownResponse

    Returns IRelation[]

    an array of derived implicit relations

Const escapeAsHtmlEntities

  • escapeAsHtmlEntities(s: string): string

Const escapeCSSWidthOrHeight

  • escapeCSSWidthOrHeight(str?: string): undefined | string
  • Parameters

    • Optional str: string

    Returns undefined | string

Const escapeHtml

  • escapeHtml(str?: string): undefined | string
  • Parameters

    • Optional str: string

    Returns undefined | string

Const getHtmlId

  • getHtmlId(type: string, title: string, htmlIdsSet?: {}): string
  • Parameters

    • type: string
    • title: string
    • Optional htmlIdsSet: {}
      • [id: string]: boolean

    Returns string

Const isConclusion

Const isFunction

  • isFunction(x: any): x is Function

Const isGroupMapNode

Const isNumber

  • isNumber(x: any): x is number

Const isObject

  • isObject(x: any): x is object
  • Be careful: This check excludes arrays, even though they are objects in JavaScript.

    Parameters

    • x: any

    Returns x is object

Const isPCSStatement

Const isReconstructed

Const isRuleNode

Const isString

  • isString(x: any): x is string

Const isTokenNode

Const jsonReplacer

  • jsonReplacer(_key: string, value: any): any

Const mergeDefaults

  • mergeDefaults(settings: any, defaults: {}): any
  • Merge plugin default settings with incoming config settings.

    Any default setting can be set to an object with a 'merge' custom function. In that case this function is responsible for merging the incoming setting with default settings. The custom merge function will get the incoming setting as first parameter and should return the merged setting.

    Parameters

    • settings: any

      the incoming config settings

    • defaults: {}

      the default settings object, possible containing objects with custom merge functions

      • [key: string]: any

    Returns any

Const normalizeLink

  • normalizeLink(url: string): string

Const normalizeLinkText

  • normalizeLinkText(url: string): string

Const objectIsEmpty

  • objectIsEmpty(x: any): boolean

Const other

Const prepareForJSON

  • prepareForJSON(obj: any): any

Const reduceToMap

  • reduceToMap<K, V>(a: V[], idProvider: (curr: V) => K): Map<K, V>
  • Type parameters

    • K

    • V: object

    Parameters

    • a: V[]
    • idProvider: (curr: V) => K
        • (curr: V): K
        • Parameters

          • curr: V

          Returns K

    Returns Map<K, V>

splitByCharactersInLine

  • splitByCharactersInLine(s: string, n: number, useSpaces: boolean, a?: string[]): string[]
  • Splits a string at least every x characters. If useSpaces is true,

    Returns an array of substrings.

    Parameters

    • s: string
    • n: number
    • useSpaces: boolean
    • Optional a: string[]

    Returns string[]

Const splitByLineWidth

  • splitByLineWidth(str: string, options: { bold?: undefined | boolean; font?: undefined | string; fontSize?: undefined | number; maxWidth?: undefined | number }): string[]
  • Splits a string every x pixels, using string-pixel-width for measuring the width of the current line.

    Returns an array of substrings with width <= maxWidth.

    Only fonts measured by the string-pixel-width library are supported.

    Parameters

    • str: string
    • options: { bold?: undefined | boolean; font?: undefined | string; fontSize?: undefined | number; maxWidth?: undefined | number }
      • Optional bold?: undefined | boolean
      • Optional font?: undefined | string
      • Optional fontSize?: undefined | number
      • Optional maxWidth?: undefined | number

    Returns string[]

Const stringIsEmpty

  • stringIsEmpty(x: any): boolean

Const stringToClassName

  • stringToClassName(str: string): string

Const stringToHtmlId

  • stringToHtmlId(str: string): string

Const stringifyArgdownData

  • stringifyArgdownData(obj: object, replacer?: null | ((key: string, value: any) => any), space?: number): string
  • Parameters

    • obj: object
    • Optional replacer: null | ((key: string, value: any) => any)
    • Optional space: number

    Returns string

Const tokenLocationsToString

  • tokenLocationsToString(tokens: IToken[]): string

Const tokenize

  • tokenize(text: string): ILexingResult

Const tokensToString

  • tokensToString(tokens: IToken[]): string

Const transformToArgumentRelationType

Const validateColorString

  • validateColorString(str: string): boolean

Const validateLink

  • validateLink(url: string, allowFile: boolean): boolean
  • Parameters

    • url: string
    • allowFile: boolean

    Returns boolean

Generated using TypeDoc