...
The proposed interface, in PHP psuedo-code, could look like this:
This is intended less as a formal proposal than a scratch location for writing out thoughts as I look at usages of WikiTransformation
.
Code Block | ||
---|---|---|
| ||
enum WikitextMode { FEED, MODULELIST, PAGE, FORUM_POST, DIRECT_MESSAGE, TABLE_OF_CONTENTS, } function __construct(WikitextMode $mode, PageInfo $pageInfo); function renderHtml(string $wikitext): HtmlOutput; function renderText(string $wikitext): TextOutput; |
The WikiTransformation::purifyHtml
static method will be moved to a new HTML utility class.
We will need to output backlinks and include numbers up to the main page compilation in Outdater
.