Skip to content

Commit

Permalink
Support for non-latin characters in heading anchor links (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
SleepWalker authored and JoelMarcey committed Apr 17, 2018
1 parent ba024a2 commit 1642c07
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [1.0.11] - 2018-04-12

This is a general release with additions and documentation updates (which are already live on docusaurus.io). We would also like to welcome [BlueWhale](https://facebookresearch.github.io/BlueWhale) as a new user of Docusaurus.
This is a general release with additions and documentation updates (which are already live on docusaurus.io). We would also like to welcome [BlueWhale](https://facebookresearch.github.io/BlueWhale) as a new user of Docusaurus.

Thank you to the following contributors who helped with this release:

Expand Down
14 changes: 14 additions & 0 deletions lib/core/__tests__/toSlug.tests.js
Original file line number Diff line number Diff line change
@@ -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);
});
});
15 changes: 14 additions & 1 deletion lib/core/toSlug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1642c07

Please sign in to comment.