Jump to content
Muxe Inc Forums
Sign in to follow this  
dandv

RegKeywords regexp ^[^=] doesn't match leading spaces

Recommended Posts

dandv    0

1. In NDN.HGL, have the following definition for some type of file (e.g. INI)

  Regkeywords color Yellow ^[^=]+

 

2. Test it against a file that contains:

abc=1 - works
a bc=1 - works
    abc=1 - doesn't work!

Edited by dandv

Share this post


Link to post
Share on other sites
GPFault    0

Maybe this bug is really 2 bugs:

1. NDN skip space at the beginning of line

regkeywords color green \ bug

("\ " mean space in regexp - it works)

this`ll highlight only first line of this file:

x bug
  bug

 

2. the ^ symbol at the beginning of highlighter is seemed to be parsed by NDN and isn`t send to PCRE lib.

regkeywords color green ^bug1, (^)bug2

(^) is equivalent to ^ in PCRE lib - i`ve tested it in pcre 5.0.

but in this file:

bug1 bug2
bug2 bug1

bug2 is highlighted everywhere(incorrect), and bug1 only at the beginning(correct)

in help is written that NDN uses pcre 5 lib. So it seems to me that pcre_exec is called by highlighter with part of string as subject parameter and 0 as startoffset

it may fix bug above if pcre_exec is called with entire string as subject and current analizing pos as startoffset.

(also lookbehinds become possible).

if i had failed to guess usage of pcre_exec i apologize about my strange suggestion...

Share this post


Link to post
Share on other sites

hi *!

 

after quite some work on regex issues i think i have fixed these and all other possible bugs concerning

RegKeyWords yesterday night

 

so please don't post any new RegKeyWord bug reports until the next release (VERY soon!) :P

 

greetings,

Stefan / AH

 

PS: did i ever say that the new forum is many times better than the previous one?

Share this post


Link to post
Share on other sites
dandv    0
PS: did i ever say that the new forum is many times better than the previous one?

 

What I really like is the fact that I can post one bug topic after another without having to wait 150 seconds between consecutive posts (yes, I find bugs that fast ;-)

Share this post


Link to post
Share on other sites

hi!

 

i wish i could fix them as fast as you find them.

 

i searched the past 2 days for a nasty bug (exists since oct 05)

 

open tree panel (drive C in my case), close ndn, restart -> crash

 

reason: (totally unrelated, and of course another bug)

desktop read/write code loads viewer bounds and viewer desk size, but loaded

8 bytes too much and into a wrong position, coinicidentely, EXACTLY at position

for drive C into the tree table, which uninitialized the entry and crashed NDN

 

Stefan / AH

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×