Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
A class to format WikiDiffs. More...
Public Member Functions | |
_added ($lines) | |
_block ($xbeg, $xlen, $ybeg, $ylen, &$edits) | |
_block_header ($xbeg, $xlen, $ybeg, $ylen) | |
_changed ($orig, $closing) | |
_context ($lines) | |
_deleted ($lines) | |
_end_block () | |
_end_diff () | |
_lines ($lines, $prefix=' ') | |
_start_block ($header) | |
_start_diff () | |
format ($diff) | |
Format a diff. More... | |
Public Attributes | |
$leading_context_lines = 0 | |
Number of leading context "lines" to preserve. More... | |
$trailing_context_lines = 0 | |
Number of trailing context "lines" to preserve. More... | |
A class to format WikiDiffs.
This class formats the diff in classic diff format. It is intended that this class be customized via inheritance, to obtain fancier outputs.
WikiDiffFormatter::format | ( | $diff | ) |
WikiDiffFormatter::$leading_context_lines = 0 |
Number of leading context "lines" to preserve.
This should be left at zero for this class, but subclasses may want to set this to other values.
WikiDiffFormatter::$trailing_context_lines = 0 |
Number of trailing context "lines" to preserve.
This should be left at zero for this class, but subclasses may want to set this to other values.