You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Atom snippets fail to treat an octal in multiline strings as expected. While the specification at https://github.com/bevry/cson proclaims "Multi-line Strings! Without Quote Escaping!" and gives no warning about octal Atom editor gives an error message while saving a snippet definition containing an octal.
functionnullCheck(path,callback){if((''+path).indexOf('\u0000')!==-1){varer=newError('Path must be a string without null bytes');er.code='ENOENT';if(typeofcallback!=='function')thrower;process.nextTick(callback,er);// <-- line 122returnfalse;}returntrue;}
Reproduces how often: Always
Versions
> atom --version
Atom : 1.22.0
Electron: 1.6.15
Chrome : 56.0.2924.87
Node : 7.4.0
> apm --version
apm 1.18.8
npm 3.10.10
node 6.9.5 x64
python 2.7.10
git 2.15.0
> sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.1
BuildVersion: 17B48
This is the body parser that is fed to pegjs. I need to build skill in a language I do not use to contribute. Still, I am taking a look as time and attention allow.
I can try to take a stab at this one. @philoserf, a PR that did nothing but add failing unit tests for this case would be incredibly helpful and wouldn't require you to learn pegjs. Thanks for reporting this!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Atom snippets fail to treat an octal in multiline strings as expected. While the specification at https://github.com/bevry/cson proclaims "Multi-line Strings! Without Quote Escaping!" and gives no warning about octal Atom editor gives an error message while saving a snippet definition containing an octal.
Escaping a closing brace in a multi-line string is in the README for the snippets package: https://github.com/atom/snippets/blob/edf7db4e5f3d9bb0354745433cf09e14c933d75a/README.md#multi-line-snippet-body
Using the same technique to escape the opening backslash of the octal delivers the same error message as with no escaping.
Steps to Reproduce
$HOME/.atom/snippets.cson
Expected behavior:
Unlike a closing brace, other values do not require escaping in
snippets.cson
using CSON multi-line strings.OR, a means of escaping the octal exists for snippets as that require them.
OR, the README is updated to reflect this limitation in addition to the closing brace limit.
Actual behavior:
While running Atom like this,
atom --safe
Add this code fragment snippet definition to
$HOME/.atom/snippets.cson
:Upon saving the file, get this error:
Using the debugger arrive at this error message:
Which comes from this line/function:
Reproduces how often: Always
Versions
Additional Information
Not certain to which of these this issue belongs:
The text was updated successfully, but these errors were encountered: