Closure compilation failed
JarrodCTaylor opened this issue · 4 comments
JarrodCTaylor commented
plexus commented
This is code we inherited from Puget, but inlined when porting it to CLJC. Lookbehind is indeed a regex feature that is not universally available in JS engines yet.
A fix should be fairly easy though. This is really just trying to split a string that starts with an entity (e.g. < or ) into the entity and the rest of the string. This could be done with subs and clojure.string/index-of.
Here's a sketch of what that could look like (untested)
(let [semicolon-pos (str/index-of span \;)
escaped (subs span 0 semicolon-pos)
span (subs span semicolon-pos)]
,,,)Would you be interested in putting together a PR for this?
JarrodCTaylor commented
I will take a pass at it this weekend.
plexus commented

