From ebf137954cbc0ea25dd10817f820de7840a92be7 Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Thu, 21 Feb 2019 15:23:07 +0100 Subject: [PATCH] Add comment and ignore rule on regular expression. --- packages/line-ending-selector/lib/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/line-ending-selector/lib/main.js b/packages/line-ending-selector/lib/main.js index 74b1d44c0dc..c3e07ff05da 100644 --- a/packages/line-ending-selector/lib/main.js +++ b/packages/line-ending-selector/lib/main.js @@ -7,6 +7,11 @@ import StatusBarItem from './status-bar-item' import helpers from './helpers' const LineEndingRegExp = /\r\n|\n/g + +// the following regular expression is executed natively via the `substring` package, +// where `\A` corresponds to the beginning of the string. +// More info: https://github.com/atom/line-ending-selector/pull/56 +// eslint-disable-next-line no-useless-escape const LFRegExp = /(\A|[^\r])\n/g const CRLFRegExp = /\r\n/g