Function build

  • Build an annotated text from a parser and some text suitable for use with LanguageTool.

    Parameters

    • text: string

      The text to parse.

    • parse: unknown

      A function that parses the text and returns an AST.

    • Optionaloptions: IOptions

      Options to control how the text is parsed.

    Returns IAnnotatedtext

    since version 1.2.0. Will be deleted in version 2.0.

    Use compose instead. This was done to remove the test dependencies on unified and remark-parse. This library was never meant to be specific to those libraries or any particularly text format (HTML, markdown, etc.).

    Libraries that use this library should be responsible for parsing the text and passing the AST to this library.