Skip to content

Commit f2e040f

Browse files
committed
- Ensure consistent and correct line ends after format
- Ignore warnings from auto generated file
1 parent f435672 commit f2e040f

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

‎External/Plugins/CodeFormatter/Handlers/AS3_exParser.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
using Antlr.Runtime.Tree;
2020

21+
#pragma warning disable
2122
public class AS3_exParser : Parser
2223
{
2324
public static readonly string[] tokenNames = new string[]

‎External/Plugins/CodeFormatter/PluginMain.cs‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,11 @@ public void Format(Object sender, System.EventArgs e)
265265
TraceManager.Add(TextHelper.GetString("Info.CouldNotFormat"), -3);
266266
PluginBase.MainForm.CallCommand("PluginCommand", "ResultsPanel.ShowResults");
267267
}
268-
else doc.SciControl.Text = asResultData;
268+
else
269+
{
270+
doc.SciControl.Text = asResultData;
271+
doc.SciControl.ConvertEOLs(doc.SciControl.EOLMode);
272+
}
269273
break;
270274

271275
case TYPE_MXML:
@@ -278,7 +282,11 @@ public void Format(Object sender, System.EventArgs e)
278282
TraceManager.Add(TextHelper.GetString("Info.CouldNotFormat"), -3);
279283
PluginBase.MainForm.CallCommand("PluginCommand", "ResultsPanel.ShowResults");
280284
}
281-
else doc.SciControl.Text = mxmlResultData;
285+
else
286+
{
287+
doc.SciControl.Text = mxmlResultData;
288+
doc.SciControl.ConvertEOLs(doc.SciControl.EOLMode);
289+
}
282290
break;
283291
}
284292
}

0 commit comments

Comments
 (0)