private long getStartLine(final TextRange highlight) {
        int lineNoFrom = highlight.getFrom().getLineNo();
        if (lineNoFrom == 1) {
            // Content starts on first line so convert to an offset as the server code
            // works in zero based line numbers
            return lineNoFrom - 1;
        } else {
            //
            return lineNoFrom;
        }
    }
The ranges returned are line/col positions in the input text. Thus the input text should
not be changed/formatted after the highlight ranges have been generated.
stroom-core-client/src/main/java/stroom/dashboard/client/text/TextPresenter.java