Skip to content
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
2 changes: 1 addition & 1 deletion docs/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ Docsify provides [theme properties](#theme-properties) for simplified customizat
}
```

?> **Theme authors**: Consider providing instructions for loading your recommended web fonts manually instead of including them in your theme using `@import`. This allows users who prefer a different font to avoid loading your recommended web font(s) unnecessarily.
> [!TIP] **Theme authors**: Consider providing instructions for loading your recommended web fonts manually instead of including them in your theme using `@import`. This allows users who prefer a different font to avoid loading your recommended web font(s) unnecessarily.

4. Advanced styling may require custom CSS declarations. This is expected, however custom CSS declarations may break when new versions of Docsify are released. When possible, leverage [theme properties](#theme-properties) instead of custom declarations or lock your [CDN](cdn) URLs to a [specific version](cdn#specific-version) to avoid potential issues when using custom CSS declarations.

Expand Down
3 changes: 2 additions & 1 deletion src/core/render/slugify.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export function slugify(str) {

let slug = str
.trim()
.normalize('NFKD')
.normalize('NFC')
.replace(/\uFE0F/g, '')
.replace(/[\p{Emoji_Presentation}\p{Extended_Pictographic}]/gu, '')
.replace(/[A-Z]+/g, lower)
.replace(/<[^>]+>/g, '')
Expand Down
2 changes: 1 addition & 1 deletion test/unit/render-util.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ describe('core/render/slugify', () => {
expect(nestedHtmlStrippedSlug).toBe('another-broken-example');

const emojiRemovedSlug = slugify('emoji test ⚠️🔥✅');
expect(emojiRemovedSlug).toBe('emoji-test-');
expect(emojiRemovedSlug).toBe('emoji-test-');

const multiSpaceSlug = slugify('Title with multiple spaces');
expect(multiSpaceSlug).toBe('title----with---multiple-spaces');
Expand Down
Loading