 
   handleAttributes: (m, min, max) ->
     attributes = m[1].split(/\s*&\s*/)
-    term =
-      min: min
-      max: max
-      features: []
+    term = createTerm(min: min, max: max)
 
     for attr in attributes
       m2 = attr.match(/\(?(\S+)\s*=\s*"(\S+)"/)


###* @jsx React.DOM ###

createTerm = ->
  word:     ''
  pos:      null
  features: []
  min:      null
  max:      null

  isLemma: false
  isStart: false
  isEnd:   false


window.CwbMultiwordInput = React.createClass

        isEnd   = /^\.\+/.test(word)
        word = word.replace(/^(?:\.\+)?(.+?)/, "$1").replace(/(.+?)(?:\.\+)?$/, "$1")

        term = createTerm(word: word, min: min, max: max, isStart: isStart, isEnd: isEnd)
        dq.push(term)

        min = null
        max = null
