Commit 7128756d authored by Douwe Maan's avatar Douwe Maan

Extract title from copy/pasted SSH key when it ends in a newline

parent d2b30dd2
......@@ -9,7 +9,7 @@
$('#key_key').on('focusout', function(){
var title = $('#key_title'),
val = $('#key_key').val(),
comment = val.match(/^\S+ \S+ (.+)$/);
comment = val.match(/^\S+ \S+ (.+)\n?$/);
if( comment && comment.length > 1 && title.val() == '' ){
$('#key_title').val( comment[1] );
......
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