mirror of
https://github.com/atom/atom.git
synced 2026-02-18 02:21:43 -05:00
Spike optional doc: key for command
This isn't working yet.
This commit is contained in:
@@ -52,10 +52,14 @@ _.mixin
|
||||
regex = RegExp('[' + specials.join('\\') + ']', 'g')
|
||||
string.replace(regex, "\\$&");
|
||||
|
||||
humanizeEventName: (eventName) ->
|
||||
humanizeEventName: (eventName, optionalDocString) ->
|
||||
return "GitHub" if eventName.toLowerCase() is "github"
|
||||
|
||||
if /:/.test(eventName)
|
||||
[namespace, name] = eventName.split(':')
|
||||
return "#{@humanizeEventName(namespace)}: #{@humanizeEventName(name)}"
|
||||
return "#{@humanizeEventName(namespace)}: #{@humanizeEventName(name, optionalDocString)}"
|
||||
|
||||
return optionalDocString if not _.isEmpty(optionalDocString)
|
||||
|
||||
words = eventName.split('-')
|
||||
words.map(_.capitalize).join(' ')
|
||||
|
||||
Reference in New Issue
Block a user