Open Bug 1361856 Opened 3 years ago Updated 1 month ago

Implement RegExp s (dotAll) flag

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: leonardo.balter, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug, )

Details

(4 keywords)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36

Steps to reproduce:

TC39's stage 3 proposal

https://github.com/tc39/proposal-regexp-dotall-flag

Test262 files under the `regexp-dotall` features flag:

test/annexB/built-ins/RegExp/prototype/flags/order-after-compile.js
test/built-ins/RegExp/dotall/with-dotall-unicode.js
test/built-ins/RegExp/dotall/with-dotall.js
test/built-ins/RegExp/duplicate-flags.js
test/built-ins/RegExp/prototype/dotAll/length.js
test/built-ins/RegExp/prototype/dotAll/name.js
test/built-ins/RegExp/prototype/dotAll/prop-desc.js
test/built-ins/RegExp/prototype/dotAll/this-val-invalid-obj.js
test/built-ins/RegExp/prototype/dotAll/this-val-non-obj.js
test/built-ins/RegExp/prototype/dotAll/this-val-regexp-prototype.js
test/built-ins/RegExp/prototype/dotAll/this-val-regexp.js
test/built-ins/RegExp/prototype/flags/order.js
test/built-ins/RegExp/prototype/flags/s.js
I'm also adding these tests to the test/jstests.list file
The skip list is here: https://bugzilla.mozilla.org/show_bug.cgi?id=1362169
Depends on: 1367105
Keywords: triage-deferred
Priority: -- → P3
This feature was approved for ES2018 and is now standard.  It is already supported by current Chrome and by Safari TP.
Status: UNCONFIRMED → NEW
Ever confirmed: true
No longer blocks: es-proposals-stage-4
This was supported in Chrome 64 and now on Safari 11.1.  Maybe some "parity" tags should be added here.
What's the status?
Type: defect → enhancement
Duplicate of this bug: 1579867

I see that this bug report is from 2 years ago, yet hasn't been fixed. I see that it is now a duplicate of my bug report, 1579867. I'm not sure how bug fixing works here at Mozilla, since I found the process way too difficult for me to understand or attempt (I have 40 years of professional experience creating software tools, but in very different and much simpler environments), but I see no reason to delay further, as the documentation (see citation in my bug report) already states that the s flag exists. It can't be very difficult to implement, in my opinion, from a technical point of view.

I believe that Firefox documentation and software should be kept in synchronization somehow. Perhaps you don't store the documentation in the same git as the software? You might consider coordinating them better, as I've seen other examples of inconsistency.

A workaround for this problem is to use [^\x05]* instead of .* (\x05 is my favorite unused control character for internal uses). I'm not sure how to get this workaround to the users. It might be easier to fix the bug, perhaps.

(In reply to David Spector from comment #7)

but I see no reason to delay further, as the documentation (see citation in my bug report) already states that the s flag exists. It can't be very difficult to implement, in my opinion, from a technical point of view.

I believe that Firefox documentation and software should be kept in synchronization somehow. Perhaps you don't store the documentation in the same git as the software? You might consider coordinating them better, as I've seen other examples of inconsistency.

Please note that MDN web docs is a browser comprehensive wiki documenting the web standards, it's not (just) a "Firefox documentation". And the browser compatibility section of the page you referenced in bug 1579867 clearly states that the "dotAll" feature covered here is not supported by Firefox yet.

As far as I can tell, the relevant code for this touches the files at https://searchfox.org/mozilla-central/search?q=&case=false&regexp=false&path=js%2F**%2FRegExp*, presumably mainly https://searchfox.org/mozilla-central/source/js/src/builtin/RegExp.cpp.

Having said that, I am far from being able to implement this myself.

Sebastian

I did not say that "MDN web docs" is just "Firefox documentation. I am a regular contributor to MDN docs and know what it is. I'm glad you located the source code that must be changed. I hope someone will actually fix some of these bugs that sit around for years.

(In reply to github from comment #10)

In 2018, the dotall flag was added to the specification. Here we are approaching 2020 and Firefox still hasn't implemented it. In what year will Mozilla implement the 2018 specification?

Please stop asking this question in every single regular expression related bug, you already got an answer in bug 1362154.

(In reply to Tom Schuster [:evilpie] from comment #11)

Please stop asking this question in every single regular expression related bug, you already got an answer in bug 1362154.

  1. To whom are you directing this statement? To me? Someone else?
  2. What answer are you referring to in #1362154? It is not obvious.

Sending brief, ambiguous, and nasty comments is not helpful to fixing old bugs.

I probably shouldn't have said "nasty" in my last post. I should have said "negative". Why does Bugzilla not have a way to edit or at least delete a recent post? So strange.

(In reply to David Spector from comment #13)

(In reply to Tom Schuster [:evilpie] from comment #11)

Please stop asking this question in every single regular expression related bug, you already got an answer in bug 1362154.

  1. To whom are you directing this statement? To me? Someone else?
  2. What answer are you referring to in #1362154? It is not obvious.

Sending brief, ambiguous, and nasty comments is not helpful to fixing old bugs.

Sorry, this is an answer to another comment that is now hidden. Ian is actively working on updating our copy of the v8 regular expression code that should enable us to run all new regular expression features from ES2018 (bug 1362154 comment 22). You can follow this work in the meta bug 1367105.

You need to log in before you can comment on or make changes to this bug.