moinwiki / moin

MoinMoin Wiki Development (2.0+), unstable, for production please use 1.9.x.
https://moinmo.in/
Other
299 stars 89 forks source link

DOM Converters, Item, and Macro TODOs from /docs/todo/todo.rst #1438

Open UlrichB22 opened 1 year ago

UlrichB22 commented 1 year ago

The latest readthedocs build log shows the following warning:

[...]docs/todo/todo.rst: WARNING: document isn't included in any toctree

The file docs/todo/todo.rst has not been updated for 5 years. Some descriptions are not self-explanatory. I can create 3 new issues about DOM converters, items and macros and remove todo.rst. The ideas get lost otherwise because we mainly work with issues in github. Please advise.

Duplicate to #722.

RogerHaase commented 1 year ago

With a couple of trivial edits to correct rst syntax errors, using the rst > markdown conversion tool, and copy and paste: the following is the complete content of the former /docs/todo/todo.rst. As some descriptions are not self-explanatory, this issue is likely to be open for some time. To minimize the mess, a suggestion is to open a new issue referencing this issue when working on a fix, and editing this entry to add comments in bold-italic when something is complete. If that doesn't work, improvise.

General

DOM Converters

General DOM

If someone adds a new type of node in the Moinmoin DOM tree:

TODO: add support of new types of node

Allow creation of unicode URIs for wiki links. This should also provide access to the query parameters.

Support for per-instance converters.

Include converter

Macro converter

HTML output converter

ReStructuredText

Some syntax of ReStructuredText is ignored because it can't be converted to the current DOM tree (like inline style/class/template replacement via directives). Moin needs some page about unsupported things or changes in DOM tree.

Mediawiki

Before trying to fix mediawiki>DOM parser take a look at https://www.mediawiki.org/wiki/Alternative_parsers. There may be a suitable python parser that could be used in a manner similar to markdown. Mediawiki->DOM converter based on moinwiki->DOM parsing model. Moinwiki parser has blocks (multiline markup) and inline markup, but Mediawiki has tags that are inline and can be extended to next lines (until closing tag or end of the file). This creates a problem, for some tags it can be solved by implemented preprocessor, but it doesn't work with tags that have multiline output (like <blockquote>).

There are two ways to fix it:

Item

Macros

Macro handling

Include macro