Skip to content

Question: Is there a way to remove markdown syntax ? #610

@Bacteries

Description

@Bacteries

Hi,
I use Commonmark and it works well but I have a case where I need to display my text on a non HTML output.
Is there a way to take the markdow text and return the text without the Markdown ? (and keep list "-") ?

I know something like this could works, but I was searching for the proper way (extension maybe ?) to do this, and if one already exists.

$string = str_replace(['<li>'], ['- '], $htmlFromMarkdown);
return strip_tags($string);

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionGeneral questions about the project or usage

    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