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()
345
345
Assert . Equal ( GeneratedFileSaveState . NotProcessed , files [ 2 ] . SaveState ) ;
346
346
347
347
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 ( '/' , ' \\ ' ) ) ;
349
349
Assert . Equal ( GeneratedFileSaveState . NotProcessed , files [ 3 ] . SaveState ) ;
350
350
351
351
return Task . WhenAll (
Original file line number Diff line number Diff line change @@ -75,7 +75,9 @@ internal static string GetContent( XPathNavigator node )
75
75
// Determine the indentation size of the text.
76
76
int indentSize = GetIndentSize ( node ) ;
77
77
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 )
79
81
. Select ( t => t . SubstringSafe ( indentSize ) )
80
82
. ToList ( ) ;
81
83
@@ -130,7 +132,9 @@ internal static string GetPlainText( XPathNavigator node )
130
132
// Determine the indentation size of the text.
131
133
int indentSize = GetIndentSize ( node ) ;
132
134
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 )
134
138
. Select ( t => t . SubstringSafe ( indentSize ) )
135
139
. ToList ( ) ;
136
140
You can’t perform that action at this time.
0 commit comments