Skip to content

Commit

Permalink
Changed linebreak format to be compatible with ZeroBrane Studio 0.50+.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSWolf committed Apr 1, 2014
1 parent d3cbcaf commit 7692eca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
7 changes: 1 addition & 6 deletions MoaiUtils/DocExport/Exporters/ZeroBraneExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using MoaiUtils.LuaIO;
using MoaiUtils.MoaiParsing;
using MoaiUtils.MoaiParsing.CodeGraph;
Expand Down Expand Up @@ -142,13 +141,9 @@ private static void AppendParameterInfo(StringBuilder result, Parameter paramete
}
}

private static readonly Regex newlineRegex = new Regex(@"\r\n?|\n", RegexOptions.Compiled);

// For whatever reason, ZeroBrane expects line breaks to be marked with "<br>".
// It doesn't understand any other HTML, though.
private static string ConvertString(string s) {
if (s == null) return null;
return newlineRegex.Replace(s, "<br>");
return s.Replace("\r", string.Empty);
}
}
}
3 changes: 0 additions & 3 deletions MoaiUtils/MoaiUtils.sln
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,4 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
EndGlobal

0 comments on commit 7692eca

Please sign in to comment.