Skip to content

feat: change signature of convert #398

@xitep

Description

@xitep

What is the proposed feature?

I suggest to change the signature of convert (in html-to-markdown-rs) from

fn convert(html: &str, options: Option<ConversionOptions>)

to

fn convert(html: &str, options: ConversionOptions)

Why would this be a good addition?

I don't see much much point in the Option; callers can simply supply Default::default() (or ConversionOptions::default() for None. The API becomes a bit more explicit and easier to read (no wondering what a None parameter does that might be different from the default) while reducing the need to wrap the options with Some.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions