Skip to content

Allow skipping encoding command in output #16

@Ovid

Description

@Ovid

Hi there,

In OpenAPI, it's common to use Markdown inside. However, I'm writing Perl code from OpenAPI documents and the POD is not an entire document, but a partial document because I am grabbing descriptions from various sections of the OpenAPI routes and building them into a class. That leaves me with the following code:

                    $description = $markdown->markdown_to_pod(
                        encoding => 'utf8',
                        markdown => $resolved->{description},
                    );

                    # Markdown::Pod adds this, but we don't want it because
                    # we're creating snippets of POD, not the entire document
                    $description =~ s/\A=encoding utf8\n\n//;
                    $resolved->{description} = $description;

It would be nice if I could just do this:

                    $description = $markdown->markdown_to_pod(
                        encoding => 'utf8',
                        markdown => $resolved->{description},
                        fragment  => 1, # needs much better name!
                    );

And not get the =encoding utf8 added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions