Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
languagephp
enum WikitextMode {
    FEED,
    LIST,
    PAGE,
    FORUM_POST,
    DIRECT_MESSAGE,
    TABLE_OF_CONTENTS,
}

function __construct(WikitextMode $mode, PageInfo $pageInfo);

function renderHtml(string $wikitext): HtmlOutput;
function renderText(string $wikitext): TextOutput;

...