File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
SparkDevNetwork.Rock.CodeGenerator.Tests/ListBlock
SparkDevNetwork.Rock.CodeGenerator/Documentation Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ public Task GeneratedFilesProducesExpectedOutput()
345345 Assert . Equal ( GeneratedFileSaveState . NotProcessed , files [ 2 ] . SaveState ) ;
346346
347347 Assert . Equal ( "types.partial.ts" , files [ 3 ] . FileName ) ;
348- Assert . Equal ( "Rock.JavaScript.Obsidian.Blocks\\ src\\ Core\\ MyObjectList\\ types.partial.ts" , files [ 3 ] . SolutionRelativePath ) ;
348+ Assert . Equal ( "Rock.JavaScript.Obsidian.Blocks\\ src\\ Core\\ MyObjectList\\ types.partial.ts" , files [ 3 ] . SolutionRelativePath . Replace ( '/' , ' \\ ' ) ) ;
349349 Assert . Equal ( GeneratedFileSaveState . NotProcessed , files [ 3 ] . SaveState ) ;
350350
351351 return Task . WhenAll (
Original file line number Diff line number Diff line change @@ -75,7 +75,9 @@ internal static string GetContent( XPathNavigator node )
7575 // Determine the indentation size of the text.
7676 int indentSize = GetIndentSize ( node ) ;
7777
78- var textLines = text . Split ( new string [ ] { "\r \n " } , StringSplitOptions . None )
78+ // XmlDocument will normalize \r\n to \n on platforms
79+ // that only use \n so we need to split for both patterns.
80+ var textLines = text . Split ( new string [ ] { "\r \n " , "\n " } , StringSplitOptions . None )
7981 . Select ( t => t . SubstringSafe ( indentSize ) )
8082 . ToList ( ) ;
8183
@@ -130,7 +132,9 @@ internal static string GetPlainText( XPathNavigator node )
130132 // Determine the indentation size of the text.
131133 int indentSize = GetIndentSize ( node ) ;
132134
133- var textLines = text . Split ( new string [ ] { "\r \n " } , StringSplitOptions . None )
135+ // XmlDocument will normalize \r\n to \n on platforms
136+ // that only use \n so we need to split for both patterns.
137+ var textLines = text . Split ( new string [ ] { "\r \n " , "\n " } , StringSplitOptions . None )
134138 . Select ( t => t . SubstringSafe ( indentSize ) )
135139 . ToList ( ) ;
136140
You can’t perform that action at this time.
0 commit comments