         drawBlockquotes(forGlyphRange: glyphsToShow, at: origin)
         drawLists(forGlyphRange: glyphsToShow, at: origin)
     }
+}
 
-    private func drawBlockquotes(forGlyphRange glyphsToShow: NSRange, at origin: CGPoint) {
+
+// MARK: - Blockquote Helpers
+//
+private extension LayoutManager {
+
+    func drawBlockquotes(forGlyphRange glyphsToShow: NSRange, at origin: CGPoint) {
         guard let textStorage = textStorage else {
             return
         }

import UIKit
import QuartzCore

class LayoutManager: NSLayoutManager {

    var blockquoteBorderColor: UIColor = UIColor(red: 0.52, green: 0.65, blue: 0.73, alpha: 1.0)

        blockquoteBorderColor.setFill()
        context.fill(borderRect)
    }
}


// MARK: - Lists Helpers
//
private extension LayoutManager {

    func drawLists(forGlyphRange glyphsToShow: NSRange, at origin: CGPoint) {
        guard let textStorage = textStorage else {
            return
        }

        let characterRange = self.characterRange(forGlyphRange: glyphsToShow, actualGlyphRange: nil)
        // draw list markers
        textStorage.enumerateAttribute(NSParagraphStyleAttributeName, in: characterRange, options: []) { (object, range, stop) in
            guard let paragraphStyle = object as? ParagraphStyle, paragraphStyle.textList != nil else {
                return
            }

            let listGlyphRange = glyphRange(forCharacterRange:range, actualCharacterRange: nil)

            enumerateLineFragments(forGlyphRange: listGlyphRange) { (rect, usedRect, textContainer, glyphRange, stop) in
                let lineRect = rect.offsetBy(dx: origin.x, dy: origin.y)
                let lineRange = self.characterRange(forGlyphRange: glyphRange, actualGlyphRange: nil)

                guard let textList = textStorage.textListAttribute(atIndex: lineRange.location),
                    textStorage.isStartOfNewLine(atLocation: lineRange.location) else
                {
                    return
                }

                let paragraphAttributes = textStorage.attributes(at: lineRange.location, effectiveRange: nil)
                let markerAttributes = self.markerAttributesBasedOnParagraph(attributes: paragraphAttributes)

                let itemNumber = textStorage.itemNumber(in: textList, at: lineRange.location)
                let markerRect = lineRect.offsetBy(dx: paragraphStyle.headIndent - Metrics.defaultIndentation, dy: paragraphStyle.paragraphSpacingBefore)
                let markerText = NSAttributedString(string:textList.style.markerText(forItemNumber: itemNumber), attributes:markerAttributes)

                markerText.draw(in: markerRect)
            }
        }
    }
