Skip to content

Commit

Permalink
fix: function typos (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Bolotsky authored Jul 27, 2021
1 parent 4b3ed9d commit 9916803
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hooks/use-landmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const useLandmark = ({ containerRef, markSelector }, deps = []) => {
setLinks(
Array.from(allMarks).map(({ id, innerText, tagName }) => ({
title: innerText,
anchor: `#${id || anchorify(innerText)}`,
anchor: `#${anchorify(id || innerText)}`,
tagName,
})),
);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const slugify = (path) =>
// anchor strings sane
const anchorify = (str) =>
slugify(str)
.replace(/[=\\]/g, '-')
.replace(/[=/]/g, '-')
.replace(/^\d+/g, '')
.replace(/^-*/g, '')
.replace(/-*$/g, '');
Expand Down

0 comments on commit 9916803

Please sign in to comment.