head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	2006.01.31.11.11.43;	author TWikiContributor;	state Exp;
branches;
next	;


desc
@new-topic
@


1.1
log
@buildrelease
@
text
@---+ Package =TWiki::Merge=

Support for merging strings


%TOC%

---++ StaticMethod *insDelMerge* <tt>($a,$b,$sep,$session,$info)</tt>

Perform a merge of two versions of the same text, using
HTML tags to mark conflicts.

The granularity of the merge depends on the setting of $sep.
For example, if it is ="\\n"=, a line-by-line merge will be done.

Where conflicts exist, they are marked using HTML &lt;del> and
&lt;ins> tags. &lt;del> marks content from $a while &lt;ins>
marks content from $b.

Non-conflicting content (insertions from either set) are not
marked.

The plugins mergeHandler is called for each merge.



---++ StaticMethod *simpleMerge* <tt>($a,$b,$sep) -> \@@arr</tt>

Perform a merge of two versions of the same text, returning
and array of strings representing the blocks in the merged context
where each string starts with one of "+", "-" or " " depending on
whether it is an insertion, a deletion, or just text. Insertions
and deletions alway happen in pairs, as text taken in from either
version that does not replace text in the other version will simply
be accepted.

The granularity of the merge depends on the setting of $sep.
For example, if it is ="\\n"=, a line-by-line merge will be done.
$sep characters are retained in the outout.


@
