Here is a new version of diff.page action.
It sends mails very simmilar to those sent through a list.
Old lines are precceded by '>'
Removed lines are precceded by '<' (I had to invent something)
new lines are not precceded by anything

Here's an example of the result:
---------------------------------------------------------

You have requested to be alerted if the page "Swiki Beta 9 (refs package)" on the
"Swiki Beta 9 (refs package)" CoWeb has changed. It was edited on 28 March 2000 at
4:16:43 pm by localhost.

The url is 'http://localhost/refs/1'.


> This is the documentation for Swiki Beta 9 (codename: "Four Strong Winds"). Check
out the <a href="/docs/1">docs</a> package for a different featured swiki and the
new features of Beta 9.
>
> The refs package was created for *Colleen Kehoe>[EMAIL PROTECTED]* to use in
her classes. So far, the refs package has proven to be more useable than the docs
package, so we are advocating using it as the default swiki.
>
> !Features Different from the docs Package
> -Cached References: reverse references are listed in the 'View' mode. That way, it
becomes very easy to browse the Swiki, since it becomes like a spider's web. Check
out *2* to get an example of this.

-Test!

< -HolA!
> -Integrated editing and locking. Check out 'help' above for more information on
how this is implemented.
> -Forms: Check out *3*.
> -E-mail Alerts: Check out the edit version of *3*.
>
> !More stuff
> -Other Test line


--
A390 1BBA 2C58 D679 5A71 - 86F9 404F 4B53 3944 C2D0
Investigacion y Desarrollo - CoreLabs - Core SDI
http://www.core-sdi.com

[:diffs :answer :prev |
        diffs do: [:assoc |
                answer _ answer,String cr.
                prev ~= assoc key ifTrue: [
                        (prev = #insert or: [assoc key = #insert]) ifTrue: [
                                answer _ answer, String cr].
                        prev _ assoc key].
                assoc key = #match ifTrue: [answer _ answer,'> ',assoc value].
                assoc key = #remove ifTrue: [answer _ answer,'< ',assoc value].
                assoc key = #insert ifTrue: [answer _ answer, assoc value]].
        answer]
                value: (TextDiffBuilder from: (page versions at: page versions size - 
1) text to: page versions last text) buildPatchSequence
                value: ''
                value: #match.

Reply via email to