View topic | Edit | WYSIWYGAttachPrintable
r2 - 01 Apr 2006 - 07:55:39 - TWikiContributorYou are here: Proyecto META >  TWiki Web  > TWikiMergeDotPm

Package TWiki::Merge

Support for merging strings

StaticMethod insDelMerge ($a,$b,$sep,$session,$info)

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 <del> and <ins> tags. <del> marks content from $a while <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 ($a,$b,$sep) -> \@arr

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.

View topic | Edit |  | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions...
 
Powered by Proyecto META
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Proyecto META? Send feedback