   fileprivate var unescaping = MarkdownUnescaping()
 
   // MARK: Configuration
-  /// Enables or disables detection of URLs even without Markdown format
-  open var automaticLinkDetectionEnabled: Bool = true
+  /// Enables individual Markdown elements and automatic link detection
+  open var enabledElements: EnabledElements {
+    didSet {
+      updateDefaultElements()
+    }
+  }
   open let font: UIFont
 
   // MARK: Initializer
   public init(font: UIFont = UIFont.systemFont(ofSize: UIFont.smallSystemFontSize),
-              automaticLinkDetectionEnabled: Bool = true,
+              enabledElements: EnabledElements = .all,
               customElements: [MarkdownElement] = []) {
     self.font = font
 

import UIKit

open class MarkdownParser {

  // MARK: Element Arrays
  fileprivate var escapingElements: [MarkdownElement]
  fileprivate var defaultElements: [MarkdownElement]
  fileprivate var unescapingElements: [MarkdownElement]

  open var customElements: [MarkdownElement]

    elements.append(contentsOf: customElements)
    elements.append(contentsOf: unescapingElements)
    elements.forEach { element in
      element.parse(attributedString)
    }
    return attributedString
  }

  fileprivate func updateDefaultElements() {
    let pairs: [(EnabledElements, MarkdownElement)] = [
      (.automaticLink, automaticLink),
      (.header, header),
      (.list, list),
      (.quote, quote),
      (.link, link),
      (.bold, bold),
      (.italic, italic),
      (.code, code),
      ]
    defaultElements = pairs.filter({ (enabled, _) in
      enabledElements.contains(enabled) })
      .map({ (_, element) in
        element })
  }

}
