/// <summary>
        /// Reformat all comments between the specified start and end point. Comments that start
        /// within the range, even if they overlap the end are included.
        /// </summary>
        /// <param name="textDocument">The text document.</param>
        /// <param name="start">The start point.</param>
        /// <param name="end">The end point.</param>
        public bool FormatComments(TextDocument textDocument, EditPoint start, EditPoint end)
        {
            bool foundComments = false;

            var options = FormatterOptions
                          .FromSettings(Settings.Default)
                          .Set(o =>
            {
                o.TabSize      = textDocument.TabSize;
                o.IgnoreTokens = CodeCommentHelper
                                 .GetTaskListTokens(_package)
                                 .Concat(Settings.Default.Formatting_IgnoreLinesStartingWith.Cast <string>())
                                 .ToArray();
            });

            while (start.Line <= end.Line)
            {
                if (CodeCommentHelper.IsCommentLine(start))
                {
                    var comment = new CodeComment(start, options);

                    if (comment.IsValid)
                    {
                        comment.Format();
                        foundComments = true;
                    }

                    if (comment.EndPoint != null)
                    {
                        start = comment.EndPoint.CreateEditPoint();
                    }
                }

                if (start.Line == textDocument.EndPoint.Line)
                {
                    break;
                }

                start.LineDown();
                start.StartOfLine();
            }

            return(foundComments);
        }