mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 08:16:09 +08:00
4be05ff754
Summary: - Remove thread_participants prop, we don't use them anywhere and the underscore-case is ugly. - Move autolinker into extension, update autolinker to 0.18.1 for phone number support - document message.coffee, add isFromMe() - Add tracking pixel extension that removes pixels from mail you *send*. Maybe more features later. Test Plan: Run 1 new test! (woo...) Reviewers: evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D1787
16 lines
563 B
CoffeeScript
16 lines
563 B
CoffeeScript
RegExpUtils =
|
|
|
|
# It's important that the regex be wrapped in parens, otherwise
|
|
# javascript's RegExp::exec method won't find anything even when the
|
|
# regex matches!
|
|
#
|
|
# It's also imporant we return a fresh copy of the RegExp every time. A
|
|
# javascript regex is stateful and multiple functions using this method
|
|
# will cause unexpected behavior!
|
|
emailRegex: -> new RegExp(/([a-z.A-Z0-9%+_-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})/g)
|
|
|
|
# https://regex101.com/r/zG7aW4/3
|
|
imageTagRegex: -> /<img\s+[^>]*src="([^"]*)"[^>]*>/g
|
|
|
|
module.exports = RegExpUtils
|