Releases: quantizor/markdown-to-jsx
6.5.1
6.5.0
One new feature: the ability to supply a custom createElement
function!
Otherwise, there are a few fixes around arbitrary HTML handling to avoid regex backtracking.
6b881ae adjust html regex to handle invalid HTML
d36798c workaround for parsing block html inside arbitrary html
ac20c7c Add createElement option (#152) ・Thank you @hugmanrique!
1e3b1d5 update the README ToC
d0f5fe2 fix heading level ・Thank you @pravdomil!
d5b4b12 minor changes in readme
6.4.1
6.4.0
178a961 add explainer for the attribute regex
cbc776e handle JSX inside JSX interpolations
abc5616 don't unquote interpolation values
97bef99 add info to README about interpolation restrictions and workarounds
9825590 handle JSX interpolations as strings
07bcf60 handle indentation for self-closing HTML/JSX
89978ba adjust the site a little
6.3.2
6.3.1
6.3.0
2363c39 exclusively inline returns should be wrapped in a span, not p
1ccf119 handle empty input
2baf46a add forceBlock and forceInline parsing options
By default, the compiler will try to make an intelligent guess
about the content passed and wrap it in a <div>
, <p>
, or
<span>
as needed to satisfy the "inline"-ness of the markdown.
For instance, this string would be considered "inline":
Hello. _Beautiful_ day isn't it?
But this string would be considered "block" due to the existence of
a header tag, which is a block-level HTML element:
# Whaddup?
However, if you really want all input strings to be treated
as "block" layout, simply pass options.forceBlock = true
like this:
<Markdown options={{ forceBlock: true }}>
Hello there old chap!
</Markdown>
// or
compiler('Hello there old chap!', { forceBlock: true });
// renders
<p>Hello there old chap!</p>
The inverse is also available by passing options.forceInline = true
:
<Markdown options={{ forceInline: true }}>
# You got it babe!
</Markdown>
// or
compiler('# You got it babe!', { forceInline: true });
// renders
<span># You got it babe!</span>
6.2.2
62c7aa6 tweak the table regex to handle the table syntax with pipes on both ends
some more bundle size reductions - now 4.22kB
DCE'd and gzipped
also added a section to the README on how to achieve that figure: https://github.com/probablyup/markdown-to-jsx#getting-the-smallest-possible-bundle-size