remove_markdown_links

Function remove_markdown_links 

Source
pub fn remove_markdown_links(input: &str) -> String
Expand description

Replaces Markdown links in the input text with just the text.

§Arguments

  • input - A string slice that contains Markdown text with links.

§Returns

A string with Markdown links replaced by their corresponding text.

§Examples

use remove_markdown_links::remove_markdown_links;
let markdown = "This is a [link](https://www.example.com) to Example.".to_string();
let result = remove_markdown_links(&markdown);
assert_eq!(result, "This is a link to Example.");