Skip to content

Releases: quantizor/markdown-to-jsx

6.5.1

12 Mar 02:34
Compare
Choose a tag to compare

3191b49 Support spaces between equal sign for html attributes (#162) ・Thank you @Jonarod!

6.5.0

07 Mar 05:37
Compare
Choose a tag to compare

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

10 Jan 06:52
Compare
Choose a tag to compare

5a5cac9 go back to using proper esm imports

6.4.0

30 Dec 21:44
Compare
Choose a tag to compare

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

23 Dec 01:58
Compare
Choose a tag to compare

52564d3 fix extra table cell rendered for external pipe syntax (#139)

  • fix extra table cell rendered for external pipe syntax

  • add some more tests

  • handle content around the table better

6.3.1

20 Dec 07:02
Compare
Choose a tag to compare

a9e3b74 fix #136 and optimize the block html regex

6.3.0

16 Dec 03:55
Compare
Choose a tag to compare

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

15 Dec 06:06
Compare
Choose a tag to compare

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

6.2.1

12 Dec 06:50
Compare
Choose a tag to compare

bef82a5 fix handling of nested HTML tags of the same type (#130) - thanks for the report @michaelryancaputo

6.2.0

12 Dec 05:34
Compare
Choose a tag to compare

5cbb12f use the same heuristic as React to handle hyphenated attributes (#128)

  • use the same heuristic as React to handle hyphenated attributes
  • remove some unnecessary code
  • some code cleanup
  • add svg test

a391247 add a simplified syntax for defining overrides on components alone (#127)