From: Jean-Philippe Bruyère Date: Wed, 1 Feb 2017 05:48:01 +0000 (+0100) Subject: allow commented line in Style '//' X-Git-Tag: v0.9.5-beta~251 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=3d9ddabb58437ad829d29aacefa262100ef83e4b;p=jp%2Fcrow.git allow commented line in Style '//' --- diff --git a/src/StyleReader.cs b/src/StyleReader.cs index 27b3f4b5..caf6ec0a 100644 --- a/src/StyleReader.cs +++ b/src/StyleReader.cs @@ -46,7 +46,12 @@ namespace Crow while (!EndOfStream) { char c = (Char)Read (); - + if (c == '/' && !EndOfStream) { + if ((char)Peek () == '/') {//process comment, skip until newline + ReadLine (); + continue; + } + } switch (state) { case readerState.classNames: if (c.IsWhiteSpaceOrNewLine () || c == ',' || c == '{') {