1
0
mirror of https://github.com/flarum/core.git synced 2025-07-27 19:50:20 +02:00

Merge pull request #1975 from flarum/fl/194-better-slugs

Use Laravel's slugger for basic transliteration
This commit is contained in:
Franz Liedke
2020-01-31 13:32:55 +01:00
committed by GitHub
4 changed files with 6 additions and 33 deletions

View File

@@ -16,6 +16,10 @@ export function truncate(string, length, start = 0) {
* Create a slug out of the given string. Non-alphanumeric characters are
* converted to hyphens.
*
* NOTE: This method does not use the comparably sophisticated transliteration
* mechanism that is employed in the backend. Therefore, it should only be used
* to *suggest* slugs that can be overridden by the user.
*
* @param {String} string
* @return {String}
*/