diff --git a/MFormatter.m b/MFormatter.m index e96177c..da2b448 100644 --- a/MFormatter.m +++ b/MFormatter.m @@ -203,7 +203,11 @@ actCodeFinal = obj.performReplacements(actCode); end - line = [strtrim(actCodeFinal), ' ', actComment]; + if ~obj.IsInBlockComment + line = [strtrim(actCodeFinal), ' ', actComment]; + else + line = [strtrim(actCodeFinal), actComment]; + end replacedTextArray = [replacedTextArray, {line, sprintf('\n')}]; end % The last new-line must be removed: inner new-lines are removed by the split, the last one is an additional one