ClojureScript: Uncaught SyntaxError: Invalid regular expression: /[֑-ۯۺ-ࣿ‏�-��-�יִ-﷿ﹰ-ﻼ]/: Range out of order in character class

Compiled by shadow-cljs latest, I got this error,

image

and the source code is:

/**
 * Regular expression to check for RTL characters, BMP and high surrogate.
 * @type {RegExp}
 * @private
 */
goog.i18n.bidi.rtlCharReg_ = new RegExp('[' + goog.i18n.bidi.rtlChars_ + ']');

looking into the value and:

goog.i18n.bidi.rtlChars_
"֑-ۯۺ-ࣿ‏�-��-�יִ-﷿ﹰ-ﻼ"

At first I thought it was an issue of UTF8, but I added meta tag and the problem remains:

<meta charset="utf-8">

<div id="app"></div>
<script type="text/javascript" src="main.js"></script>

Weird… fixed by adding head tag…

<head>

<meta charset="utf-8">
</head>

<div id="app"></div>
<script type="text/javascript" src="main.js"></script>