mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 18:32:52 +02:00
Support for non-latin characters in heading anchor links (#492)
This commit is contained in:
parent
ba024a25c7
commit
1642c078a7
3 changed files with 29 additions and 2 deletions
14
lib/core/__tests__/toSlug.tests.js
Normal file
14
lib/core/__tests__/toSlug.tests.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
const toSlug = require('../toSlug');
|
||||
|
||||
[
|
||||
['Hello world! ', 'hello-world'],
|
||||
['React 16', 'react-16'],
|
||||
['Hello. // (world?)! ', 'hello-world'],
|
||||
['Привет мир! ', 'привет-мир'],
|
||||
['Über Café.', 'uber-cafe'],
|
||||
['Someting long ...', 'someting-long-'],
|
||||
].forEach(([input, output]) => {
|
||||
test(`toSlug('${input}') -> '${output}'`, () => {
|
||||
expect(toSlug(input)).toBe(output);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue