Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #567

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .changeset/tall-crabs-flow.md

This file was deleted.

Binary file not shown.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# 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`.

```js
import { slugify } from 'markdown-to-jsx';

options={{
slugify: str => {
let result = slugify(str)

return result ? '-' + str : result;
}
}}
```

## 7.4.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Convert markdown to JSX with ease for React and React-like projects. Super lightweight and highly configurable.",
"homepage": "https://markdown-to-jsx.quantizor.dev",
"license": "MIT",
"version": "7.4.5",
"version": "7.4.6",
"publishConfig": {
"access": "public"
},
Expand Down