           data = /\{!(.*)!\}/.exec(obj.content)[1].replace(/^\s\s*/, '').replace(/\s\s*$/, '')
           obj.content = "{! #{data + paddingSpaces} !}"
           return obj
-        else if obj.type is 'goal QM'
+        else if obj.type is 'goal ?s'
+          obj.content = "#{obj.content}"
+          return obj
+
+        else if obj.type is 'goal ?'
           goalIndex = goalIndices[index]
           index += 1
           paddingSpaces = ' '.repeat(goalIndex.toString().length)
-          switch obj.content.length
-            when 3 then obj.content = "#{obj.content[0]}{! #{paddingSpaces} !}#{obj.content[2]}"
-            when 2 then obj.content = "{! #{paddingSpaces} !}#{obj.content[1]}"
+          obj.content = "{! #{paddingSpaces} !}#{obj.content[1]}"
           return obj
         else
           return obj

{Point, Range} = require 'atom'
Goal = require './goal'

commentRegex = ///
  (--[^\r\n]*[\r\n])
///

goalBracketRegex = ///
  (\{![^!\}]*!\})
///

goalQMRegex = ///
  # single ?
  ([\s\(\{\_\;\.\"@]
  \?
  [\s\)\}\_\;\.\"@])
  |
  # consequtive ?
  (?=\?[\s\)\}\_\;\.\"@])
  (\?
  [\s\)\}\_\;\.\"@])
///

# manages all Goals in a editor
class GoalManager extends EventEmitter

        content: raw
        type: 'raw'
      }]
  lex: (regex, sourceTypeName, targetTypeName) ->
    pulp = @result.map (token) =>
      if token.type is sourceTypeName
        token.content
          .split regex
          .map (token, i) =>
            if isOf token, regex
              type = targetTypeName
            else
              type = sourceTypeName
            return {
              content: token
              type: type
