Skip to content

Commit

Permalink
Resolve #18 by extending C++ exception case around removal of EOF tra…
Browse files Browse the repository at this point in the history
…iling new line to also skip on .rc2 files.
  • Loading branch information
codecadwallader committed Aug 25, 2014
1 parent 9328911 commit 0deb8ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CodeMaid/Logic/Cleaning/RemoveWhitespaceLogic.cs
Expand Up @@ -215,7 +215,8 @@ internal void RemoveEOFTrailingNewLine(TextDocument textDocument)
if (cursor.AtEndOfDocument && cursor.AtStartOfLine && cursor.AtEndOfLine)
{
// Make an exception for C++ resource files to work-around known EOF issue: http://connect.microsoft.com/VisualStudio/feedback/details/173903/resource-compiler-returns-a-rc1004-unexpected-eof-found-error#details
if (textDocument.Language == "C/C++" && textDocument.Parent.FullName.EndsWith(".h"))
if (textDocument.Language == "C/C++" &&
(textDocument.Parent.FullName.EndsWith(".h") || textDocument.Parent.FullName.EndsWith(".rc2")))
{
return;
}
Expand Down

0 comments on commit 0deb8ea

Please sign in to comment.