diff --git a/csharp/Platform.RegularExpressions.Transformer.CSharpToCpp/CSharpToCppTransformer.cs b/csharp/Platform.RegularExpressions.Transformer.CSharpToCpp/CSharpToCppTransformer.cs index 977947f..a610c1d 100644 --- a/csharp/Platform.RegularExpressions.Transformer.CSharpToCpp/CSharpToCppTransformer.cs +++ b/csharp/Platform.RegularExpressions.Transformer.CSharpToCpp/CSharpToCppTransformer.cs @@ -607,12 +607,12 @@ public class CSharpToCppTransformer : TextTransformer // [Fact] // (new Regex(@"(?\r?\n|\A)(?[\t ]+)\[[a-zA-Z0-9]+(\((?((?\()|(?<-parenthesis>\))|[^()\r\n]*)+)(?(parenthesis)(?!))\))?\][ \t]*(\r?\n\k)?"), "${firstNewLine}${indent}", 5), - // \n ... namespace - // namespace - (new Regex(@"(\S[\r\n]{1,2})?[\r\n]+namespace"), "$1namespace", 0), - // \n ... class - // class - (new Regex(@"(\S[\r\n]{1,2})?[\r\n]+class"), "$1class", 0), + // \A \n ... namespace + // \Anamespace + (new Regex(@"(\A)(\r?\n)+namespace"), "$1namespace", 0), + // \A \n ... class + // \Aclass + (new Regex(@"(\A)(\r?\n)+class"), "$1class", 0), // \n\n\n // \n\n (new Regex(@"\r?\n[ \t]*\r?\n[ \t]*\r?\n"), Environment.NewLine + Environment.NewLine, 50),