1 # Syntax highlighting of recent changes
4 is there a simple way to highlight the diff printed in the [[/recentchanges]]
5 page? I imagined several solutions, but I am still wondering about the best one.
7 * One might activate the [[plugins/highlight]] and [[plugins/format]] plugins,
8 and change the [[change.tmpl|/templates]] template, to use this plugin. But as
9 the diff is formatted not to mess up html (e.g. `\[[link]]` becomes
10 `[[link]]`), the output would be unreadable.
11 * One might improve [[plugins/recentchangesdiff]] plugin by adding an option
12 `diff_escape_html=>yes/no` to it. Setting this to `no` would leave html
13 unescaped, so that it would be correctly rendered by plugin
15 * One might change the [[plugins/recentchangesdiff]] plugin, to add syntax
16 highlighting to diffs, but this would duplicate plugin [[plugins/highlight]].
18 In my opinion, the second solution is the best one. However, to be neat the
19 `change.tmpl` template might detect that both plugin [[plugins/format]] and
20 `diff_escape_html` option are enabled, and, depending on it, output the diff
21 in `<pre>DIFF</pre>` tags or in the `\[[!format diff """DIFF"""]]` directive.
23 Letting user edit `change.tmpl` template to enable this feature is also
24 possible, but this would prevent him from benefiting of the later improvement
25 of this template. In my opinion, an ideal solution would require the user
26 nothing more than enabling some plugins or options.