dreamcat4 / skippy-xd

A full-screen Exposé-style standalone task switcher for X11.
GNU General Public License v2.0
99 stars 12 forks source link

config: new regex code - seems broken --> to be reverted #158

Closed dreamcat4 closed 1 year ago

dreamcat4 commented 1 year ago

Recently changed regex for config parsing. Having added additional extra terms. To make more 'robust', ahem, comments handling.

https://github.com/dreamcat4/skippy-xd/commit/132399f1e11d603f5706ac510c75ce4c8d0daac6

Unfortunately while the website regex checker seems to think that this regex works correctly as intended... when actually running and doing some new testings today (on real skippy config file)... this is not working.

Tracking down the cause is perhaps somewhat difficult, since it could be any one of several different potential reason(s). For why it is actually broken. But at any rate:

Just simply want to revert this as single commit. To be going back to simpler previous regex for now. *as has always been. And perhaps can try to attempt again some other time.

By reverting this commit. It keeps the existing version simple. To not loose track of what extra regex terms that isn't working anyhow (at least for in the real compiled skippy program).

Here are links to what was used as the online web regex checker website:

https://regex101.com/

And the regex string:

^[[:space:]]*([[:alnum:]]+)[[:space:]]*=[[:space:]]*(.*?)([[:space:]]*|[[:space:]]*\/\/.*|[[:space:]]*;.*$|[[:space:]]*(#[^0-9a-fA-F]|#.{1,5}[^0-9a-fA-F]).*)$

And the test lines (example config lines):

exposeLayout = xd;breaks parsing, line gets completely ignored
pipePath = /tmp/skippy-xd-fifo; // sokdoks
 iconFillSpec = orig mid mid #00FFFF //fffffoo #Something ;comment
dreamcat4 commented 1 year ago

Reverted back to previous simpler regex (for now). In commit https://github.com/dreamcat4/skippy-xd/commit/4d2292e6406081d9b7e3a855deadf2ad98e417e4