Assume file extensions are up to 7 chars long

See .desktop files
This commit is contained in:
Kovid Goyal 2018-07-26 18:37:13 +05:30
parent 011866a101
commit 341a34ea9e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -255,7 +255,7 @@ def functions_for(args):
) )
post_processors.append(url) post_processors.append(url)
elif args.type == 'path': elif args.type == 'path':
pattern = r'(?:\S*/\S+)|(?:\S+[.][a-zA-Z0-9]{2,5})' pattern = r'(?:\S*/\S+)|(?:\S+[.][a-zA-Z0-9]{2,7})'
post_processors.extend((brackets, quotes)) post_processors.extend((brackets, quotes))
elif args.type == 'line': elif args.type == 'line':
pattern = '(?m)^\\s*(.+)[\\s\0]*$' pattern = '(?m)^\\s*(.+)[\\s\0]*$'