node-nginx-config icon indicating copy to clipboard operation
node-nginx-config copied to clipboard

comment detector too sensitive, detects # in urls as comments

Open mattbloomfield opened this issue 7 years ago • 2 comments

I know this is old but maybe it will help someone else

Consider redirects to AngularJS urls: /my/app/#/page1

I worked around this by modifying the code to, which works in my use case and just forces comments to be followed by a space:

// lib/parse.js
...
} else if (currentBuffer.slice(-2) == "# ") {
                commentHandler.init(token);
...

mattbloomfield avatar May 21 '18 14:05 mattbloomfield

well, after looking at the current code, i'm pretty sure i'll change it a fair amount if i get into it, and i'll probably use nginx-conf as a backend, which is definitely a more mature project. I do like how mine is kinda jquery like, though, so i'll keep that aspect of it but more as a wrapper around the nginx-conf package.

adiktofsugar avatar May 25 '18 07:05 adiktofsugar

Yeah, in my case I'm using a hybrid of both of the projects as I wanted something where I could pull the directives out and edit them in a web form and then compile them back to a config file on the server end. Maybe I'll write a new package dependent on both this and nginx-conf! Oh the world of NPM haha.

mattbloomfield avatar May 25 '18 13:05 mattbloomfield