SuperEdi

User: Guest

Search

Please use the
Bug Report Form
if you think you found a software defect.

Use the Contact Form
to send a personal message to Wolfgang.

RSS Feed RSS Feed

Other boards:
Juke
QBrowser
Raduga (English)
Song Requester

Perl highlighter has bugs with comments

Posted on: SuperEdi

From Message

Chuck

2014-03-27 12:38:42

Perl highlighter has bugs with comments

SuperEdit 4.3.1 on Win 7.

The perl highlighter seems to have some bugs with double quotes. Examples here:

(I can't post the real URL here as I got a message that says "stop spamming". Are we not allowed to post example images?)

imgur dot com/SmkuXNp

imgur dot com/QSqjqQQ

Does anyone have any fixes for this? The Perl highlighter is a .SYN text file. But I'm not sure what the syntax of each entry is.

Thanks!


Wolfgang Loch

2014-03-28 21:02:27

Re: Perl highlighter has bugs with comments

The Problem is not with the comments, but with regural expressions.

For example, in the regex /\d"/ the double-quote is part of the regext, but the SuperEdi syntax highlighter sees it as the start of a string.

I'm afraid there is no way to specify the Syntax of Perl regexes in the .SYN Format, because there are many way how you could write a regex, for example:

/\d"/
m/\d"//
m,\d",
m{\d"}
s/\d"//

Any idea how this can parsed correctly?

Wolfgang Loch

2014-03-28 21:03:51

Re: Perl highlighter has bugs with comments

As a workaround I add a comment after the regex, for example:

$var =~ s/\d+"//g; #"

Post a reply to this message: