Append a insertion to the diff.

Parameters:

  • buf: buffer for the diff.
  • log: log that contains the inserted entry.
  • entry_index: index of the inserted entry in log.
  • sorted_mismatches: sorted list of indexes of the items to emphasize in the specified entry.

Property definitions

saxophonit $ SAXEventLogger :: diff_append_insertion
	# Append a insertion to the diff.
	#
	# Parameters:
	#
	# * `buf`: buffer for the diff.
	# * `log`: log that contains the inserted entry.
	# * `entry_index`: index of the inserted entry in `log`.
	# * `sorted_mismatches`: sorted list of indexes of the items to emphasize
	# in the specified entry.
	private fun diff_append_insertion(buf: Buffer, log: Array[Array[String]],
			entry_index: Int, sorted_mismatches: Collection[Int]) do
		buf.append(term_insertion)
		buf.append("> {entry_index}|")
		diff_append_mismatch_entry(buf, log[entry_index], sorted_mismatches,
			term_insertion, term_insertion_emphasis)
		buf.append(term_default)
		buf.append("\n")
	end
lib/saxophonit/testing.nit:200,2--217,4