     line = line.substring(0, quoteIndex)
 
     attributePattern.exec(line)?[1]
+
+  getAttributeValues: (editor, cursor) ->
+    attribute = @completions.attributes[@getPreviousAttribute(editor, cursor)]
+    attribute?.attribOption ? []
+
+  getTagAttributes: (editor, cursor) ->
+    tag = @getPreviousTag(editor, cursor)
+    @completions.tags[tag]?.attributes ? []

    for attribute, options of @completions.attributes
      completions.push({word: attribute, prefix: ''}) if options.global

    tagAttributes = @completions.tags[@getPreviousTag(editor, cursor)]?.attributes ? []
    for attribute in tagAttributes
      completions.push({word: attribute, prefix: ''})



  getAllAttributeValueCompletions: ({editor, cursor}) ->
    completions = []
    values = @getAttributeValues(editor, cursor)
    for value in values
      completions.push({word: value, prefix: ''})
    completions

  getAttributeValueCompletions: ({editor, cursor, prefix}) ->
    completions = []
    values = @getAttributeValues(editor, cursor)
    for value in values when value.indexOf(prefix) is 0
      completions.push({word: value, prefix})
    completions

  loadCompletions: ->
