Skip to content

Releases: quantizor/markdown-to-jsx

v7.6.0

12 Nov 06:27
ada1fad
Compare
Choose a tag to compare

Minor Changes

  • 2281a4d: Add options.disableAutoLink to customize bare URL handling behavior.

    By default, bare URLs in the markdown document will be converted into an anchor tag. This behavior can be disabled if desired.

    <Markdown options={{ disableAutoLink: true }}>
      The URL https://quantizor.dev will not be rendered as an anchor tag.
    </Markdown>
    
    // or
    
    compiler(
      'The URL https://quantizor.dev will not be rendered as an anchor tag.',
      { disableAutoLink: true }
    )
    
    // renders:
    
    <span>
      The URL https://quantizor.dev will not be rendered as an anchor tag.
    </span>

Patch Changes

  • fb3d716: Simplify handling of fallback scenario if a link reference is missing its corresponding footnote.

v7.5.1

12 Nov 05:47
69a9856
Compare
Choose a tag to compare

Patch Changes

  • b16f668: Fix issue with lookback cache resulting in false detection of lists inside lists in some scenarios
  • 58b96d3: fix: handle empty HTML tags more consistently #597

v7.5.0

18 Aug 16:24
3a04b9e
Compare
Choose a tag to compare

Minor Changes

  • 62a16f3: Allow modifying HTML attribute sanitization when options.sanitizer is passed by the composer.

    By default a lightweight URL sanitizer function is provided to avoid common attack vectors that might be placed into the href of an anchor tag, for example. The sanitizer receives the input, the HTML tag being targeted, and the attribute name. The original function is available as a library export called sanitizer.

    This can be overridden and replaced with a custom sanitizer if desired via options.sanitizer:

    // sanitizer in this situation would receive:
    // ('javascript:alert("foo")', 'a', 'href')
    
    <Markdown options={{ sanitizer: (value, tag, attribute) => value }}>
      {`[foo](javascript:alert("foo"))`}
    </Markdown>
    
    // or
    
    compiler('[foo](javascript:alert("foo"))', {
      sanitizer: (value, tag, attribute) => value,
    })

Patch Changes

  • 553a175: Replace RuleType enum with an object

v7.4.7

13 Apr 06:44
acd970d
Compare
Choose a tag to compare

Patch Changes

  • 7603248: Fix parsing isolation of individual table cells.
  • f9328cc: Improved block html detection regex to handle certain edge cases that cause extreme slowness. Thank you @devbrains-com for the basis for this fix 🤝

v7.4.6

05 Apr 19:07
ede3cd8
Compare
Choose a tag to compare

Patch Changes

  • a9e5276: Browsers assign element with id to the global scope using the value as the variable name. E.g.: <h1 id="analytics"> can be referenced via window.analytics.
    This can be a problem when a name conflict happens. For instance, pages that expect analytics.push() to be a function will stop working if the an element with an id of analytics exists in the page.

    In this change, we export the slugify function so that users can easily augment it.
    This can be used to avoid variable name conflicts by giving the element a different id.

    import { slugify } from 'markdown-to-jsx';
    
    options={{
      slugify: str => {
        let result = slugify(str)
    
        return result ? '-' + str : result;
      }
    }}

v7.4.5

22 Mar 20:10
9012179
Compare
Choose a tag to compare

Patch Changes

  • f5a0079: fix: double newline between consecutive blockquote syntax creates separate blockquotes

    Previously, for consecutive blockquotes they were rendered as one:

    Input

    > Block A.1
    > Block A.2
    
    > Block B.1

    Output

    <blockquote>
      <p>Block A.1</p>
      <p>Block A.2</p>
      <p>Block.B.1</p>
    </blockquote>

    This is not compliant with the GFM spec which states that consecutive blocks should be created if there is a blank line between them.

v7.4.4

21 Mar 04:16
Compare
Choose a tag to compare

What's Changed

New Contributors

  • @zegl made their first contribution in #551
  • @austingreco made their first contribution in #550
  • @github-actions made their first contribution in #556

Full Changelog: v7.4.3...v7.4.4

v7.4.3

13 Mar 00:43
d5cf45f
Compare
Choose a tag to compare

What's Changed

  • fix: restore x-browser stable sort logic in #548 (fixes unclosed HTML tags that showed up for some edge cases)

Full Changelog: v7.4.2...v7.4.3

v7.4.2

12 Mar 14:31
Compare
Choose a tag to compare

Re-release 7.4.1 with less existential console screaming

v7.4.1

29 Jan 19:26
17e1455
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v7.4.0...v7.4.1