diff --git a/vsintegration/src/FSharp.Editor/DocComments/XMLDocumentation.fs b/vsintegration/src/FSharp.Editor/DocComments/XMLDocumentation.fs index b48991fb350..e24b89cc609 100644 --- a/vsintegration/src/FSharp.Editor/DocComments/XMLDocumentation.fs +++ b/vsintegration/src/FSharp.Editor/DocComments/XMLDocumentation.fs @@ -78,10 +78,12 @@ type internal TextSanitizingCollector(collector, ?lineLimit: int) = interface ITaggedTextCollector with member _.Add taggedText = - // TODO: bail out early if line limit is already hit - match taggedText.Tag with - | TextTag.Text -> reportTextLines taggedText.Text - | _ -> addTaggedTextEntry taggedText + match lineLimit with + | Some lineLimit when lineLimit < count -> () + | _ -> + match taggedText.Tag with + | TextTag.Text -> reportTextLines taggedText.Text + | _ -> addTaggedTextEntry taggedText member _.IsEmpty = isEmpty member _.EndsWithLineBreak = isEmpty || endsWithLineBreak