def _docf(self, tag, val):
        """
        Callback used as the handler argument to process_docs(). This converts
        Stone doc references to JSDoc-friendly annotations.
        """
        # TODO(kelkabany): We're currently just dropping all doc ref tags ...
        # NOTE(praneshp): ... except for versioned routes
        if tag == 'route':
            if ':' in val:
                val, version = val.split(':', 1)
                version = int(version)
            else:
                version = 1
            url = fmt_url(self.cur_namespace.name, val, version)
            # NOTE: In js, for comments, we drop the namespace name and the '/' when
            # documenting URLs
            return url[(len(self.cur_namespace.name) + 1):]

        return val