   matchInitial: new RegExp "\'(.+)\'"
   matchConnection: new RegExp "\-\>"
   matchSeparator: new RegExp "[\\s,\\n]"
-  matchSubgraph: new RegExp "\n *\\'(.+)\\' *-> *GRAPH *([A-Za-z\\.]+)\\(Graph\\)"
+  matchSubgraph: new RegExp "\n *\\'(.+)\\' *-> *GRAPH *([A-Za-z\\.]+)\\(Graph\\) *\n"
 
   constructor: ->
     @lastElement = null

      else
        [match, file, name, index, original] = match

        # Get the FBP of the subgraph and compile that first
        fbp = @compileSubgraphs(@loadFile(file))

        # Affix the name to the beginning of all components in the subgraph
        fbp = fbp.replace(@matchComponentGlobal, "#{name}.$1($2)")

        # Replace the graph statement with the FBP
        string = string.replace(match, "\n#{fbp}")


  parse: (string) ->

      throw err if err

  # Compile subgraphs INTO the parent graph
  compileSubgraphs: (string, currentFile) ->
    loop
      match = string.match(@matchSubgraph)

