GNHLUG
>
TWiki Web
>
TWikiMergeDotPm
(revision 1) (raw view)
Edit
Attach
---+ 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 <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* <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.
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2006-02-01
-
TWikiContributor
TWiki
Log In
or
Register
TWiki Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
GNHLUG
Main
Org
TWiki
Copyright © 1999-2025 by the contributing authors. All material from TWiki is the property of the contributing authors.
Questions, comments, or concerns?
Contact GNHLUG
.
All use of this site subject to our
Legal Notice
(includes Terms of Service).