     suffix = content.substr end, prefixLen
     [prefix.trim(), suffix.trim()]
         
-
   # Get the matching DOM elements for a given text range
   # 
   # If the "path" argument is supplied, scan is called automatically.

      delete result.pathInfo.node
    result

  # Get the matching DOM elements for a given set of text ranges
  # (Calles getMappingsForRange for each element in the givenl ist)
  getMappingsForRanges: (ranges, path = null) ->


    mappings

  # Return the rendered value of a part of the dom.
  # If path is not given, the default path is used.
  getContentForPath: (path = null) -> 
    path ?= @getDefaultPath()       
    @allPaths[path].content

  # Return the length of the rendered value of a part of the dom.
  # If path is not given, the default path is used.
  getLengthForPath: (path = null) ->
    path ?= @getDefaultPath()
    @allPaths[path].length

  # Return a given range of the rendered value of a part of the dom.
  # If path is not given, the default path is used.
  getContentForRange: (start, end, path = null) ->
    @getContentForPath(path).substr start, end - start

  # Get the context that encompasses the given text range
  # in the rendered text of the document
  getContextForRange: (start, end) ->
    content = @getContentForPath()
    prefixStart = Math.max 0, start - CONTEXT_LEN
