This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
markdown-to-jsx@7.4.6
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;
}
}}
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
markdown-to-jsx@7.4.6
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 viawindow.analytics
. This can be a problem when a name conflict happens. For instance, pages that expectanalytics.push()
to be a function will stop working if the an element with anid
ofanalytics
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 differentid
.