Open core-ai-bot opened 3 years ago
Comment by bchintx Wednesday Aug 14, 2013 at 03:26 GMT
Great suggestions@
njx@
peterflynn! I wasn't aware of regexEscape(), and I had earlier discounted indexOf() because it is case-sensitive. However, after I ran some tests, I don't think case-sensitivity will matter here.
I've updated the pull request to use the much simpler indexOf() solution. Thanks!
Comment by TomMalbran Wednesday Aug 14, 2013 at 04:29 GMT
Nice catch. If it actually needs to be case insensitive, doing module.uri.toLocaleLowerCase().indexOf(path.toLocaleLowerCae()) === 0
should work better.
Comment by bchintx Wednesday Aug 14, 2013 at 21:04 GMT
Thanks for the additional guidance,@
TomMalbran. I've updated the pull request accordingly.
Issue by bchintx Tuesday Aug 13, 2013 at 04:42 GMT Originally opened as https://github.com/adobe/brackets/pull/4761
Problem: Running Brackets Sprint 29 installed on 64-bit Windows, preference settings in different contexts (eg. extensions) are overlapping. As a result, changing the value of one setting mistakenly changes the same-named preference setting in another context.
For example, "View > Enable JSLint" and "View > Quick View on Hover" both save their state using a preference setting named "enabled". The Preference Manager is supposed to keep these two, different extension settings separate. However, on Windows, the getClientID() function is failing and causing the Preference Manager to think both settings live in the same "com.adobe.brackets.main" context. As a result, if you change the JSLint setting and restart Brackets, you'll see that Quick View on Hover has changed to match.
In a nutshell, on 64-bit Windows, Brackets and Edge Code are installed to the folder "C:\Program Files (x86)". The parentheses are passed as the regex string and causing getClientID() to fail to find the subpath to the extensions folder.
Solution: Escape parentheses in paths before passing it to the regex search.
Related issue: Edge Code issue # 225- "Hover Preview of Images should default 'enabled' on Windows" (https://git.corp.adobe.com/edge/edge-code/issues/225)
bchintx included the following code: https://github.com/adobe/brackets/pull/4761/commits