Skip to content

v9 Access to text formatters from custom formatters #263

Closed
@webstech

Description

@webstech

Congrats on the new release. Thanks for your work on this.

I am working on updating the typescript typings. One feature of the typings was access to the formatter functions. They were exported here. I don't use the functions but they are part of the test program:

import * as formatters from 'html-to-text/lib/formatter';
...
        textFormatter: (elem, walk, builder, options) => {
            formatters.heading(elem, walk, builder, options);
        }

I am assuming this was part of the test because it was needed and I can still imagine a use case for it.

The old documentation does not mention being able to access the formatters. At least I do not recall that it did. I am opening this issue in case someone is using the formatters.

Questions:

  1. Were the formatters intended to be accessible in the previous versions?
  2. If the answer is yes, can they be re-introduced or the doc updated to reflect they are no longer available (and a suggested workaround)?

The current typescript typings work with the new release except for the formatters and removed deprecated options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions