lib/grunt/apidoc2readme.js
function (grunt, apiDocs, apiDocLink, occurrence) {
        occurrence = occurrence || 1;

        var linkString = '<a name="' + apiDocLink + '"></a>';
        var index = -1;
        var occurrenceIndex;
        for (occurrenceIndex = 0; occurrenceIndex < occurrence; occurrenceIndex++) {
            index = apiDocs.indexOf(linkString, index + 1);

            if (index === -1) {
                grunt.fail.warn(new Error('API link: ' + apiDocLink + ' not found.'));
            }
        }

        return index;
    }
function (grunt, apiDocs, apiDocLink, occurrence) {
        occurrence = occurrence || 1;

        var linkString = '<a name="' + apiDocLink + '"></a>';
        var index = -1;
        var occurrenceIndex;
        for (occurrenceIndex = 0; occurrenceIndex < occurrence; occurrenceIndex++) {
            index = apiDocs.indexOf(linkString, index + 1);

            if (index === -1) {
                grunt.fail.warn(new Error('API link: ' + apiDocLink + ' not found.'));
            }
        }

        return index;
    }
function ( grunt , apiDocs , apiDocLink , occurrence ) { occurrence = occurrence || 1 ; var linkString = '<a name="' + apiDocLink + '"></a>' ; var index = - 1 ; var occurrenceIndex ; for ( occurrenceIndex = 0 ; occurrenceIndex < occurrence ; occurrenceIndex ++ ) { index = apiDocs . indexOf ( linkString , index + 1 ) ; if ( index === - 1 ) { grunt . fail . warn ( new Error ( 'API link: ' + apiDocLink + ' not found.' ) ) ; } } return index ; }
Returns the link location in the docs.

@function
@memberof! GruntApiDocs2ReadmeTaskHelper
@private
@param {Object} grunt - The grunt instance
@param {String} apiDocs - The document text
@param {String} apiDocLink - The link to search for
@param {Number} [occurrence] - The occurrence number
@returns {Number} The location of the requested link
Returns the link location in the docs .