private static String replaceNewLines(String text) {
		int length = text.length();
		StringBuffer buf = new StringBuffer();
		int start = 0;
		while (start < length) {
			int index = text.indexOf('\n', start);
			if (index == -1) {
				buf.append(text.substring(start));
				start = length;
			}
			else {
				buf.append(text.substring(start, index));
				buf.append("<br>");
				start = index + 1;
			}
		}
		return buf.toString();
	}
Replaces new lines in the given string with HTML break tags.
@param text the original string containing new lines.
@return the new string containing break tags.
Ghidra/Features/Base/src/main/java/ghidra/app/merge/util/ConflictUtility.java