History log of /dokuwiki/inc/Parsing/ModeRegistry.php (Results 1 – 4 of 4)
Revision Date Author Comments
# 56c730b5 06-May-2026 Andreas Gohr <andi@splitbrain.org>

keep historic typo in value but not in constant

We need to keep the historic typo in the value ("substition"), but there
is no reason to keep it in the constant.


# 7958e698 16-Apr-2026 Andreas Gohr <andi@splitbrain.org>

decouple hardcoded mode names in Eol and Preformatted

Eol.php hardcoded ['listblock', 'table'] as modes to skip, and
Preformatted.php hardcoded [\*\-] as a negative lookahead for list
markers. Both

decouple hardcoded mode names in Eol and Preformatted

Eol.php hardcoded ['listblock', 'table'] as modes to skip, and
Preformatted.php hardcoded [\*\-] as a negative lookahead for list
markers. Both embed knowledge that belongs to the respective block
modes, not to Eol/Preformatted. Adding a new block mode that handles
its own EOL or uses different line start markers would require editing
these unrelated files — a hidden coupling.

Listblock and Table now register themselves on ModeRegistry during
preConnect(). Eol queries getBlockEolModes() and Preformatted queries
getLineStartMarkers() to build its lookahead dynamically. Each mode
owns its own data, and new block modes can participate without touching
unrelated files.

show more ...


# 1f443476 16-Apr-2026 Andreas Gohr <andi@splitbrain.org>

split Formatting into individual classes per formatting type

Introduce AbstractFormatting as a base class and seven concrete
classes (Strong, Emphasis, Underline, Monospace, Subscript,
Superscript,

split Formatting into individual classes per formatting type

Introduce AbstractFormatting as a base class and seven concrete
classes (Strong, Emphasis, Underline, Monospace, Subscript,
Superscript, Deleted) that each define their own patterns and
sort order. Delete the old Formatting class and update tests
to use the new classes directly. ModeRegistry now treats
formatting modes as regular built-in modes.

show more ...


# c8dd1b9d 16-Apr-2026 Andreas Gohr <andi@splitbrain.org>

introduce ModeRegistry to encapsulate parser mode categories

Replace the global $PARSER_MODES definition in inc/parser/parser.php
with a ModeRegistry singleton that initializes and manages the mode

introduce ModeRegistry to encapsulate parser mode categories

Replace the global $PARSER_MODES definition in inc/parser/parser.php
with a ModeRegistry singleton that initializes and manages the mode
categories. The global array is still populated for backward
compatibility with plugins that access it directly.

Mode constructors now use ModeRegistry::getModesForCategories()
instead of accessing the global directly. p_get_parsermodes() and
p_sort_modes() are moved to inc/deprecated.php as thin wrappers.

show more ...