mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Add escapeAttribute to underscore-extensions
This commit is contained in:
@@ -28,6 +28,9 @@ _.mixin
|
||||
escapeRegExp: (string) ->
|
||||
string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
|
||||
|
||||
escapeAttribute: (string) ->
|
||||
string.replace(/"/g, '"').replace(/\n/g, '')
|
||||
|
||||
humanizeEventName: (eventName, eventDoc) ->
|
||||
[namespace, event] = eventName.split(':')
|
||||
return _.undasherize(namespace) unless event?
|
||||
|
||||
Reference in New Issue
Block a user