Skip to content

Extract text and link from inline links #100

@tafel

Description

@tafel

Hello,

For inline links extraction, the current behaviour is to replace [text](http://link.net) either by text (replaceLinksWithURL = false) or by http://link.net (replaceLinksWithURL = true).

Is it possible to print both text and link, like text: http://link.net ?

Maybe with an option separator?

Options should be like:

const plainText = removeMd(markdown, {
  separateLinksAndText: ': ' // default to null
})

// in index.js, something like
if (options.separateLinksAndText) {
  output.replace(/\[([^\]]+)\]\(([^)]+)\)/g, `$1${options.separateLinksAndText}$2`);
}

Thanks

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