Commit 3ade8de5 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Explain regular expression

parent f2ad7aab
class GitLabCrop
# Matches everything but the file name
FILENAMEREGEX = /^.*[\\\/]/
constructor: (input, opts = {}) ->
@fileInput = $(input)
......@@ -131,7 +134,7 @@ class GitLabCrop
setPreview: ->
@previewImage.attr('src', @dataURL)
filename = @fileInput.val().replace(/^.*[\\\/]/, '')
filename = @fileInput.val().replace(FILENAMEREGEX, '')
@filename.text(filename)
setBlob: ->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment