Closed larswilke closed 9 years ago
I am reading a template like so:
private string getFileContent( DataDto saveData ) { string fileContent = string.Empty; string templateFilePath = string.Format( "{0}\\Template.txt", CONFIGURATION_FOLDER ); using ( StreamReader sr = new StreamReader( templateFilePath ) ) { string template = sr.ReadToEnd(); FormatCompiler compiler = new FormatCompiler(); Generator generator = compiler.Compile( template ); fileContent = generator.Render( saveData ); } return fileContent; }
If the file Template.txt has windows linefeed, then fileContent has none. Changing the linefeeds to unix solves the problem.
What gives?
Read the README then read this issue: https://github.com/jehugaleahsa/mustache-sharp/issues/18
I am reading a template like so:
If the file Template.txt has windows linefeed, then fileContent has none. Changing the linefeeds to unix solves the problem.
What gives?