g2384 / VHDLFormatter

VHDL formatter web online written in typescript
https://g2384.github.io/VHDLFormatter/
MIT License
51 stars 20 forks source link

SyntaxError: invalid regexp group #15

Closed tha-G closed 5 years ago

tha-G commented 5 years ago

Hello, When I try to run your code in firefox I get the following error: "Source map error: request failed with status 404"

Looking in the console I get the following: "SyntaxError: invalid regexp group VHDLFormatter.js:147:24" "SetNewLinesAfterSymbols https://g2384.github.io/VHDLFormatter/VHDLFormatter.js:147" "forEach self-hosted:262" "SetNewLinesAfterSymbols https://g2384.github.io/VHDLFormatter/VHDLFormatter.js:142" "beautify https://g2384.github.io/VHDLFormatter/VHDLFormatter.js:232" "f https://g2384.github.io/VHDLFormatter/:631" "onclick https://g2384.github.io/VHDLFormatter/:1"

Otherwise... Thanks! for the great tool, I've been using it from time to time in the past and really like it

g2384 commented 5 years ago

Can you provide your vhdl code? I must forget to escape some symbols, but I can't know which they are.

tha-G commented 5 years ago

It seems I get this error with pretty much everything I try?

for example: LIBRARY IEEE; -- declare the library USE IEEE.std_logic_1164.ALL; USE IEEE.std_logic_arith.ALL;

Is generating this syntax error. I presumed it would be like that for everybody else too?

Not that it should matter but I'm using Firefox 65.0.1 on Ubuntu 18.04.2. I also downloaded your code but locally the error is the same.

Tried to run it on a different computer again using Firefox 65.0.1 but on Ubuntu 16.04, the same error.

Any ideas, would you like me to test out different things?

Best regards,

Gerald

On Tue, Mar 12, 2019 at 4:59 PM g2384 notifications@github.com wrote:

Can you provide your vhdl code? I must forget to escape some symbols, but I can't know which they are.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/g2384/VHDLFormatter/issues/15#issuecomment-472057201, or mute the thread https://github.com/notifications/unsubscribe-auth/AuOidUNG8o-ZQJdLtiYNmUKVPP7otIjAks5vV87LgaJpZM4bqWd8 .

g2384 commented 5 years ago

This is because I used regex lookbehind syntax which is only supported by chromium. Unfortunately, Firefox doesn't support this.

You can check it here: http://kangax.github.io/compat-table/es2016plus/#test-RegExp_Lookbehind_Assertions

It has been discussed by firefox dev teams: https://bugzilla.mozilla.org/show_bug.cgi?id=1225665

tha-G commented 5 years ago

That's a pitty,

I used to run your tool in Firefox in the past without any issues. This means you improved ( or changed at least :-p) the regex code for your tool.

As a workaround I'll be using Chromium for a while ;-)

On Wed, Mar 13, 2019 at 4:49 PM g2384 notifications@github.com wrote:

This is because I used regex lookbehind syntax which is only supported by chromium. Unfortunately, Firefox doesn't support this.

You can check it here: http://kangax.github.io/compat-table/es2016plus/#test-RegExp_Lookbehind_Assertions

It has been discussed by firefox dev teams: https://bugzilla.mozilla.org/show_bug.cgi?id=1225665

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/g2384/VHDLFormatter/issues/15#issuecomment-472481880, or mute the thread https://github.com/notifications/unsubscribe-auth/AuOidajAW0qT0E_YLbK5_QCiz3bJXgi5ks5vWR4JgaJpZM4bqWd8 .

g2384 commented 5 years ago

Thanks for using this tool 😄

I've just fixed this one. Firefox should be happy now.

tha-G commented 5 years ago

You rock!

On Wed, Mar 13, 2019 at 5:56 PM g2384 notifications@github.com wrote:

Thanks for using this tool 😄

I've just fixed this one. Firefox should be happy now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/g2384/VHDLFormatter/issues/15#issuecomment-472511562, or mute the thread https://github.com/notifications/unsubscribe-auth/AuOidcX1m8eDoJN99bqU2ueMW53ID6XGks5vWS23gaJpZM4bqWd8 .