Rubberduck.Parsing.Preprocessing.LivelinessExpression.MarkAsDead C# (CSharp) Method

MarkAsDead() private method

private MarkAsDead ( string code ) : string
code string
return string
        private string MarkAsDead(string code)
        {
            bool hasNewLine = false;
            if (code.EndsWith(Environment.NewLine))
            {
                hasNewLine = true;
            }
            // Remove parsed new line.
            code = code.TrimEnd('\r', '\n');
            var lines = code.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
            var result = string.Join(Environment.NewLine, lines.Select(_ => string.Empty));
            if (hasNewLine)
            {
                result += Environment.NewLine;
            }
            return result;
        }