You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module Main exposing (main)
import Browser
import Html exposing (Html, text)
import Regex
view : Html Never
view =
text -- first submatch should be Just "" instead of Nothing
( Debug.toString
( Regex.find
( Maybe.withDefault
Regex.never
(Regex.fromString "(.*)")
)
""
)
)
main : Program () () Never
main =
Browser.sandbox
{ init = ()
, view = always view
, update = always identity
}
The text was updated successfully, but these errors were encountered:
The correction is as follows.
But I can't check it because I don't know how to run the test program with Elm native code in my local project on Elm 0.19.
--- a/src/Elm/Kernel/Regex.js
+++ b/src/Elm/Kernel/Regex.js
@@ -77,7 +77,7 @@ var _Regex_replaceAtMost = F4(function(n, re, replacer, string)
while (i > 0)
{
var submatch = arguments[i];
- submatches[--i] = submatch
+ submatches[--i] = submatch != null
? __Maybe_Just(submatch)
: __Maybe_Nothing;
}
SSCCE:
The text was updated successfully, but these errors were encountered: