1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-11 16:55:37 +00:00

Use ide.validFileRegex, not hard coded regex

This commit is contained in:
James Allen 2016-09-22 14:57:59 +01:00
parent 4386ab1225
commit 21f88bb20e

View file

@ -30,7 +30,7 @@ define [
$scope.finishRenaming = () ->
name = $scope.inputs.name
if !name.match(/^[^\*\/]*$/)
if !name.match(new RegExp(ide.validFileRegex))
# Showing the modal blurs the rename box which calls us again
# so track this with the invalidModalShowing flag
return if invalidModalShowing