I encountered an issue when using innerHTML instead of getBody() and I am looking for assistance with debugging on apps-script as mine is not functioning properly.
function findText(findme,colour,desc,rule_name) {
var body = DocumentApp.getActiveDocument().getBody();
var regExp = case_insensitive(findme);
var foundElement = body.findText(regExp);
while (foundElement != null) {
var foundText = foundElement.getElement().asText();
var start = foundElement.getStartOffset();
var end = foundElement.getEndOffsetInclusive();
foundText.setBackgroundColor(start, end, colour);
number_oresults++;
foundElement = body.findText(regExp, foundElement);
var pusher = '<p><span style="background-color:'+colour+'"><b>'+rule_name+'</b> - '+ desc +'</span></p>';
results.push(pusher);
}
}