Skip to content

HTML=true in markdownOptions not working #21

@amiccolis

Description

@amiccolis

Setting html: true in markdownOptions doesn't seem to work.

Here's a simple example:
I would expect the <a> to render as a link, but it renders as text instead.

import React from "react";
import { render } from "react-dom";
import MDReactComponent from "markdown-react-js";

const App = () => (
  <div>
    <MDReactComponent
      text="hello. <a href='#'>Link</a>"
      markdownOptions={{ html: true }}
    />
  </div>
);

render(<App />, document.getElementById("root"));

https://codesandbox.io/s/j4r51776l5

This is working in markdown-it with html enabled
https://markdown-it.github.io/

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