         return blockquoteRect
     }
     
-    private func drawNestedBlockquote(in rect: CGRect, with context: CGContext, at depth: Int) {
+    private func drawBlockquoteBorder(in rect: CGRect, with context: CGContext, at depth: Int) {
         
         let quoteCount = blockquoteBorderColors.count
-        let index = depth < quoteCount ? depth : quoteCount-1
+        let index = min(depth, quoteCount-1)
         
         if blockquoteBorderColors.indices.contains(index) {
             let borderColor = blockquoteBorderColors[index]

        let extraIndent = paragraphStyle.blockquoteIndent
        let extraRect = blockquoteRect(origin: origin, lineRect: extraLineFragmentRect, blockquoteIndent: extraIndent, lineEndsParagraph: false)

        drawBlockquote(in: extraRect.integral, with: context)
    }




    /// Draws a single Blockquote Line Fragment, in the specified Rectangle, using a given Graphics Context.
    ///
    private func drawBlockquoteBackground(in rect: CGRect, with context: CGContext) {
        if let blockquoteBackgroundColor = blockquoteBackgroundColor {
            blockquoteBackgroundColor.setFill()
            context.fill(rect)
        }
    }
}
