Skip to content

Commit

Permalink
allow use unicode in link names
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-gribanov committed Jul 11, 2019
1 parent e0fc6a8 commit 9222ff3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .travis-build.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
$depth = sprintf(' %s*', str_repeat(' ', strlen($matches['depth']) - 1));
}

$link = preg_replace(['/ /', '/[^-\w]+/'], ['-', ''], strtolower($matches['title']));
$link = $matches['title'];
$link = strtolower($link);
$link = str_replace(' ', '-', $link);
$link = preg_replace('/[^-\w]+/u', '', $link);

$chaptersFound[] = sprintf('%s [%s](#%s)', $depth, $matches['title'], $link);
}
Expand Down

0 comments on commit 9222ff3

Please sign in to comment.