Used to process: - directive entity argument values - directive tag argument values - attribute values
function consume_char_data_with_entity_directives (proc_stack, decode_entities, break_on_a, break_on_b) {
  let parts = [];
  let cur_literal = "";

  while (!proc_stack.tMatches(break_on_a) &&
         (!break_on_b || !proc_stack.tMatches(break_on_b))) {
    let matched = false;

    if (proc_stack.tMatches("&zc-")) {
      if (decode_entities) {
        cur_literal = htmlEntities.decode(cur_literal);
      }
      parts.push(cur_literal);
      cur_literal = "";
      parts.push(consume_directive_entity(proc_stack));
      matched = true;
      break;
    } else {
      cur_literal += proc_stack.tAccept();
    }
  }

  if (decode_entities) {
    cur_literal = htmlEntities.decode(cur_literal);
  }
  parts.push(cur_literal);
  return parts;
}