Feature Proposal: Add some formatting control to the $changes() search token.
Summary has some output controls, added as simple arguments to the token:
$summary(50, showvarnames, noheader, searchcontex )
Changes however has two options with no format control:
$changes Summary of changes between latest rev and previous rev
$changes(n) Summary of changes between latest rev and rev n
. Default is to generate a "diff" in plain text, suitable for emails. Meta also supports generating an html formatted diff, but search has no way to trigger it. Unfortunately neither of these options can be used in a TML table, as they both embed newlines.
There are a couple of other tasks out there in this area:
- Item13995: $changes doesn't work - only generates a simple summary
- Item9464: Request to support negative rev's
$changes(-1) for changes since the prior rev.
- Item1390: Ancient request for better rendering control on changes
Description and Documentation
This request adds some additional controls:
Returns the 'print' formatted diff since the prior revision. This is the way it's supposed to work if Item13995
n - request diff against revision=n (unchanged)
-n - calculate relative diff from current revision.
summary - Generate a simple text summary, similar to the default $summary option
html - Generate an HTML formatted diff.
print - Generate a printable format diff suitable for email notifications. (the default)
Search summary has added the following options. They probably make sense here for consistency.
Most of the changes will be in Meta::summariseChanges(). The formatting flags need to be passed through to Meta for processing.
-- Contributors: GeorgeClark
- 27 Feb 2016
Changed the "plaintext" option to "summary". If it looks like a topic summary, might as well call it that.
- 28 Feb 2016
Added the showvarnames and noheader options for the summary option, consistent with the search summary.
- 16 Mar 2017