orgajs icon indicating copy to clipboard operation
orgajs copied to clipboard

[Question] Can the Regexps be re-written to avoid backreferences?

Open anicholson opened this issue 6 years ago • 3 comments

I'm trying out orga for a project that would let me embed the parser in the client-side. Unfortunately, the regexps in the parser use backreferences - something only Chrome supports at the moment.

Is it possible to re-write those in a more browser-compliant way?

:heart:

anicholson avatar Mar 27 '19 02:03 anicholson

I think by backreferences you mean lookbehind assertions, I have removed the only usage of it (I think that's the only place 😅) from the code base, and published a prerelease, please try it out and come back with issues if any. If all good then I will make a release. ~Install it with npm i orga@next~ UPDATE: Sorry, have to publish 1.1.1 for fixing another issue #24 , you can just grab the latest version (not next).

xiaoxinghu avatar Apr 09 '19 03:04 xiaoxinghu

I'm not sure htis fixed the issue' in firefox I still get am "invalid regexp rexpression" error when trying to load orga using browserify.

titaniumbones avatar Sep 16 '19 15:09 titaniumbones

@titaniumbones yes, you are right, I see the same thing too in firefox. But it works fine in Chrome and Safari for now. Will have a look at the firefox issue later. I've also created a playground page here: https://orga.js.org if you are interested.

xiaoxinghu avatar Oct 16 '19 00:10 xiaoxinghu