   # Returns a jQuery.Deferred() promise.
   annotationFromHighlight: (highlight, client) ->
     # Try and extract annotation metadata from the locators object.
-    meta = (try ranges: @rangesFromLocator(highlight.locators) catch e then null)
-    meta = (try ranges: JSON.parse(highlight.pre) catch e then null) unless meta
+    meta = (try ranges: [highlight.locators.xpath] catch e then null) if highlight.locators.xpath
+    meta = (try ranges: JSON.parse(highlight.pre) catch e then null)  unless meta
     deferred = new jQuery.Deferred()
 
     if meta

  #     highlight = utils.highlightFromAnnotation(ann)
  #
  # Returns a highlight object.
  highlightFromAnnotation: (annotation, root) ->
    locator = @locatorsFromAnnotation(annotation, root)
    # See: https://github.com/Readmill/API/wiki/Readings
    {
      id: annotation.id

    xpath: annotation.ranges[0]
    file_id: annotation.page

  # Public: Takes an annotation object and returns a highlight object
  # suitable for submission to the Readmill server.
  #
