我正在尝试使用 Wikipedia 的 MediaWiki 解析器将 Wikipedia 标记文本解析为 HTML。我在这里浏览了手册 - https://www.mediawiki.org/wiki/Manual:Parser.php 但是,由于我对 PHP 完全陌生,我无法编写测试脚本,
这是我想要解析并转换为 HTML 的示例输入:
Shakespeare's sonnets
==Characters==
When analysed as characters, the subjects of the sonnets are usually referred
to as the Fair Youth, the Rival Poet, and the Dark Lady. The speaker expresses
admiration for the Fair Youth's beauty, and later has an affair with the Dark
Lady. It is not known whether the poems and their characters are fiction or
autobiographical; scholars who find the sonnets to be autobiographical, notably
[[A. L. Rowse]], have attempted to identify the characters with historical
individuals.