diff --git a/.changeset/tall-crabs-flow.md b/.changeset/tall-crabs-flow.md
new file mode 100644
index 00000000..8ea7184f
--- /dev/null
+++ b/.changeset/tall-crabs-flow.md
@@ -0,0 +1,21 @@
+---
+"markdown-to-jsx": patch
+---
+
+Browsers assign element with `id` to the global scope using the value as the variable name. E.g.: `
` 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;
+ }
+}}
+```
diff --git a/index.tsx b/index.tsx
index 898ad642..4b6a9a74 100644
--- a/index.tsx
+++ b/index.tsx
@@ -588,7 +588,7 @@ function unquote(str: string) {
// based on https://stackoverflow.com/a/18123682/1141611
// not complete, but probably good enough
-function slugify(str: string) {
+export function slugify(str: string) {
return str
.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g, 'a')
.replace(/[çÇ]/g, 'c')