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
The error message shown in #25 (comment) erroneously states "Cannot parse \"//css_reference\nEnsure your directive escapes all delimiters (';(){},') by doubling the delimiter character." even though I am running on Windows. Thus splitting the string for Environment.NewLine will not work. I propose to always use Environment.NewLine when composing multi-line strings.
Well it's a tricky one.
The good practice dictates that you should not expect exact line ending type even if you know the OS you are running on. Thus your splitting routine should handle both \r\n and \n.
This is what I usually use:
publicstaticstring[]GetLines(thisstringstr)=>// too simplistic though adequatestr.Replace("\r\n","\n").Split('\n');
And of course the production strength algorithm should be based on more comprehensive RegEx.
Thus I have the tendency to deal with the string Linux way. Particularly because majority of all Windows utils handle \r\n and \n transparently (cmd, powershell, notepad++).
Nevertheless, I do not close this issue and will normalize output strings in the next release.
- Issue #213: Error message uses a non-Windows \n instead of e.g. Environment.NewLine
- Issue #211: Implementing a partial class with a circular css_import results in a recursion in CS-Script and results in a PathTooLongException
- Issue #214: The exception that is thrown when a the script compiler error occurs.
- Issue #202: Better versioning of referenced NuGet packages
- Issue #203: precompiler/context["CompilerOptions"] doesn't appear to work
- Issue #198: Changes from version 3.29 to 3.30
The error message shown in #25 (comment) erroneously states
"Cannot parse \"//css_reference\nEnsure your directive escapes all delimiters (';(){},') by doubling the delimiter character."
even though I am running on Windows. Thus splitting the string forEnvironment.NewLine
will not work. I propose to always useEnvironment.NewLine
when composing multi-line strings.(Moved from #25 to new issue here.)
The text was updated successfully, but these errors were encountered: