On Jun 13, 2015, at 1:18 PM, C. Scott Ananian wrote:
To throw some more paint on the bikeshed:
The instanceof RegExp and RegExp(...) parts of the perfect
implementation of `RegExp.tag` should also be fixed to play nicely with
species.
I think Allen and I would say that you should
Heh, I remember I thought many ES6 features were oddly designed, or even
crazy. However, since I was dealing with production code and needed said
features (and had decided to target ES6), I dutifully added 'em to my
crappy transpiler one-by-one.
Now I think *I* was crazy. When I was
On Jun 13, 2015, at 4:16 PM, Allen Wirfs-Brock wrote:
On Jun 13, 2015, at 1:18 PM, C. Scott Ananian wrote:
To throw some more paint on the bikeshed:
The instanceof RegExp and RegExp(...) parts of the perfect
implementation of `RegExp.tag` should also be fixed to play nicely with
Perfection?
function re(first, ...args) {
let flags = first;
function tag(template, ...subs) {
const parts = [];
const numSubs = subs.length;
for (let i = 0; i numSubs; i++) {
parts.push(template.raw[i]);
const subst = subs[i] instanceof RegExp ?
The point of this last variant is that data gets escaped but RegExp objects
do not -- allowing you to compose RegExps: re`${re1}|${re2}*|${data}`
But this requires one more adjustment:
function re(first, ...args) {
let flags = first;
function tag(template, ...subs) {
const
On Sat, Jun 13, 2015 at 1:51 AM, Mark S. Miller erig...@google.com wrote:
Nice! Inspired
// Based on
// https://github.com/benjamingr/RexExp.escape/blob/master/polyfill.js
function re(template, ...subs) {
const parts = [];
const numSubs = subs.length;
for (let i = 0; i
Good idea bug infinite recursion bug. Fixed:
function re(first, ...args) {
let flags = first;
function tag(template, ...subs) {
const parts = [];
const numSubs = subs.length;
for (let i = 0; i numSubs; i++) {
parts.push(template.raw[i]);
All of these should be building on top of RegExp.escape :P
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Mark S.
Miller
Sent: Saturday, June 13, 2015 02:39
To: C. Scott Ananian
Cc: Benjamin Gruenbaum; es-discuss
Subject: Re: RegExp.escape()
The point of this last variant
Perhaps. I encourage you to draft a possible concrete proposal.
On Sat, Jun 13, 2015 at 11:30 AM, Jordan Harband ljh...@gmail.com wrote:
Would it help subclassing to have the list of syntax characters/code
points be on a well-known-symbol property? Like
`RegExp.prototype[@@syntaxCharacters]
To throw some more paint on the bikeshed:
The instanceof RegExp and RegExp(...) parts of the perfect
implementation of `RegExp.tag` should also be fixed to play nicely with
species.
I think Allen and I would say that you should *not* use the species pattern
for instantiating the new regexp
On Sat, Jun 13, 2015 at 9:07 PM, Mark S. Miller erig...@google.com wrote:
On Sat, Jun 13, 2015 at 9:17 AM, Domenic Denicola d...@domenic.me wrote:
All of these should be building on top of RegExp.escape :P
It's funny how, by considering it as leading to a proposal, I quickly saw
deep
On Sat, Jun 13, 2015 at 11:39 AM, Benjamin Gruenbaum benjami...@gmail.com
wrote:
On Sat, Jun 13, 2015 at 9:07 PM, Mark S. Miller erig...@google.com
wrote:
On Sat, Jun 13, 2015 at 9:17 AM, Domenic Denicola d...@domenic.me wrote:
All of these should be building on top of RegExp.escape :P
What about that part in particular?
That said - I'm very open to allowing implementations to escape _more_
than `SyntaxCharacter` in their implementations and to even recommend that
they do so in such a way that is consistent with their regular expressions.
What do you think about doing that?
On Sat, Jun 13, 2015 at 9:17 AM, Domenic Denicola d...@domenic.me wrote:
All of these should be building on top of RegExp.escape :P
I am not yet agreeing or disagreeing with this. Were both to become std,
clearly they should be consistent with each other. At the time I wrote
this, it had not
Would it help subclassing to have the list of syntax characters/code points
be on a well-known-symbol property? Like
`RegExp.prototype[@@syntaxCharacters] =
Object.freeze('^$\\.*+?()[]{}|'.split(''));` or something? Then @exec could
reference that, and similarly `RegExp.escape` and
I have tested Boris's build
The results are:
chrome is broken in large part
Mail.ru mail interface is broken
Gmail is broken
google docs is broken
peacekeeper is not broken
3 russian it news portals are not broken (UI is OK, on the one sending the
comment worked with minor bug in UI, but when I
16 matches
Mail list logo