History log of /dokuwiki/_test/tests/Parsing/ (Results 1 – 25 of 65)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
1c00c02109-Jul-2026 Andreas Gohr <gohr@cosmocode.de>

fix(parser): validate inline formatting closers with a single memoized scan

The inline formatting modes only open a span when a valid closer exists
ahead. That check was a lookahead built on CONTENT

fix(parser): validate inline formatting closers with a single memoized scan

The inline formatting modes only open a span when a valid closer exists
ahead. That check was a lookahead built on CONTENT_UNTIL_PARA, tested
character by character up to the next paragraph break and re-evaluated
from scratch for every opener candidate — openers times paragraph
length. With pcre.jit=0 a crafted 32KB page took 16s and an ordinary
34KB page with long paragraphs 37s; with the JIT on (the PHP default)
the per-character lookahead exhausted the JIT stack, the match silently
failed, and the formatting — or everything after it — rendered as plain
text.

The check also decided the wrong thing. It scanned raw text, so a closer
lookalike inside content the lexer consumes atomically — a nowiki or %%
span, a backtick code span, a link, a URL — counted as a real closer
even though the mode's exit pattern can never fire there. And it ignored
the enclosing span: an inner delimiter whose only closer lay past the
closer of the mode it sits in was entered anyway, so a stray delimiter
paired with one in a following sibling span and dragged the boundary
along — the `*` in ''glob/*.conf'' joined the `*` of the next ''...''
span and corrupted the paragraph; the same held for //, ** and __ inside
monospace, and an emphasis opened inside ((...)) ran past the footnote's
)) and the enclosing bold's **.

Each formatting mode now declares its closer through
Lexer::addCloserPattern(), mirroring addExitPattern(), and the lexer
answers "does a valid closer exist ahead" with one anchored possessive
scan per range instead of a lookahead per opener:

- The scan runs left to right from the opener, hopping over opaque spans
derived from already-registered patterns — a plain or special match is
consumed in one step, an entry into a verbatim mode (nowiki, the
backtick code spans) extends to that mode's first exit — so a closer
lookalike inside consumed content is never mistaken for a closer. Each
hop finds the earliest of boundary, closer, or opaque span in a single
leftmost search, keeping the check linear.
- An opener is rejected when the nearest enclosing mode that has a closer
of its own would close before the opener's own closer, so a delimiter
that can never close within its span stays literal. That ancestor is
found by walking the mode stack past modes that declare no closer
(plugins, footnotes); the nearest guarded ancestor suffices, as it was
itself validated against its own when it opened.
- Both verdicts are memoized and reset per parse() run: a proven closer
validates every earlier candidate, and a proven closer-free range
rejects every later candidate before the next boundary. With the lexer
consuming each opened span, the whole parse is linear in document size.

Closer patterns match the closing delimiter itself with flanking context
in lookarounds — the convention exit patterns already follow — so closer
positions compare exactly across modes and a closer directly after an
inner opener is seen. AbstractFormatting derives the closer from the exit
pattern and registers it with the paragraph break as the boundary,
preserving the rule that formatting never spans paragraphs; a mode with
other needs can pass a different boundary or none.

Footnote declares its )) as a closer rather than guarding its (( entry
with a (?=.*)) lookahead, so the footnote becomes a boundary the scan
sees and formatting inside it no longer pairs across the )); its closer
takes no paragraph boundary, as footnotes are block-level. GfmEmphasis
gains a closer pattern so single * emphasis is validated the same way,
while its entry lookahead still enforces CommonMark nearest-delimiter
pairing. GfmEmphasis and GfmStrong span bodies cannot contain their
delimiter, so their in-pattern lookaheads stay linear on their own; the
GFM backtick span bodies get deterministic alternatives with possessive
quantifiers, removing their per-character backtracking.

CONTENT_UNTIL_PARA is removed: any entry pattern built with it recreates
the quadratic scan. ParallelRegex gains escapePattern() so embedded
closer fragments follow the lexer's bare-parenthesis convention, reports
PREG_JIT_STACKLIMIT_ERROR so a future JIT exhaustion surfaces instead of
silently truncating, and no longer rewrites its registered patterns in
place while compiling the compound regex.

The adversarial 32KB page drops to 0.1s, the 37-second benign page to
0.1s, and a 128KB variant stays under 0.6s.

show more ...


/dokuwiki/_test/tests/ChangeLog/MediaChangeLogTest.php
/dokuwiki/_test/tests/ChangeLog/PageChangeLogTest.php
/dokuwiki/_test/tests/Feed/FeedParserTest.php
Lexer/LexerTest.php
ParserMode/FormattingTest.php
ParserMode/GfmDeletedTest.php
ParserMode/GfmEmphasisStrongTest.php
ParserMode/GfmEmphasisStrongUnderscoreTest.php
ParserMode/GfmEmphasisTest.php
ParserMode/GfmEmphasisUnderscoreTest.php
ParserMode/GfmStrongUnderscoreTest.php
/dokuwiki/_test/tests/Remote/ApiCoreAclCheckTest.php
/dokuwiki/_test/tests/Search/Index/LockTest.php
/dokuwiki/_test/tests/Search/IndexerTest.php
/dokuwiki/_test/tests/inc/common_saveWikiText.test.php
/dokuwiki/_test/tests/inc/httputils_xaccel.test.php
/dokuwiki/_test/tests/inc/infoutils_getversiondata.test.php
/dokuwiki/composer.json
/dokuwiki/composer.lock
/dokuwiki/inc/ChangeLog/ChangeLog.php
/dokuwiki/inc/ChangeLog/MediaChangeLog.php
/dokuwiki/inc/ChangeLog/PageChangeLog.php
/dokuwiki/inc/Feed/FeedParserFile.php
/dokuwiki/inc/Parsing/Lexer/CloserPattern.php
/dokuwiki/inc/Parsing/Lexer/Lexer.php
/dokuwiki/inc/Parsing/Lexer/ParallelRegex.php
/dokuwiki/inc/Parsing/Lexer/StateStack.php
/dokuwiki/inc/Parsing/ParserMode/AbstractFormatting.php
/dokuwiki/inc/Parsing/ParserMode/AbstractMode.php
/dokuwiki/inc/Parsing/ParserMode/Deleted.php
/dokuwiki/inc/Parsing/ParserMode/Emphasis.php
/dokuwiki/inc/Parsing/ParserMode/Footnote.php
/dokuwiki/inc/Parsing/ParserMode/GfmBacktickDouble.php
/dokuwiki/inc/Parsing/ParserMode/GfmBacktickSingle.php
/dokuwiki/inc/Parsing/ParserMode/GfmDeleted.php
/dokuwiki/inc/Parsing/ParserMode/GfmEmphasis.php
/dokuwiki/inc/Parsing/ParserMode/GfmEmphasisStrong.php
/dokuwiki/inc/Parsing/ParserMode/GfmEmphasisStrongUnderscore.php
/dokuwiki/inc/Parsing/ParserMode/GfmEmphasisUnderscore.php
/dokuwiki/inc/Parsing/ParserMode/GfmLink.php
/dokuwiki/inc/Parsing/ParserMode/GfmListblock.php
/dokuwiki/inc/Parsing/ParserMode/GfmStrongUnderscore.php
/dokuwiki/inc/Parsing/ParserMode/Monospace.php
/dokuwiki/inc/Parsing/ParserMode/Strong.php
/dokuwiki/inc/Parsing/ParserMode/Subscript.php
/dokuwiki/inc/Parsing/ParserMode/Superscript.php
/dokuwiki/inc/Parsing/ParserMode/Underline.php
/dokuwiki/inc/Remote/ApiCore.php
/dokuwiki/inc/Search/Collection/DirectCollection.php
/dokuwiki/inc/Search/Index/FileIndex.php
/dokuwiki/inc/Search/Index/Lock.php
/dokuwiki/inc/Search/Indexer.php
/dokuwiki/inc/Ui/Admin.php
/dokuwiki/inc/httputils.php
/dokuwiki/inc/infoutils.php
/dokuwiki/lib/plugins/info/syntax.php
/dokuwiki/vendor/composer/installed.json
/dokuwiki/vendor/composer/installed.php
/dokuwiki/vendor/splitbrain/slika/src/ImageInfo.php
3a5ba39508-Jul-2026 Andreas Gohr <gohr@cosmocode.de>

fix(parser): treat quotes next to bold/underline markup as smart quotes

With typography=2 a single-quoted phrase wrapped in strong or underline
markup (**'x'** / __'x'__) rendered apostrophes instea

fix(parser): treat quotes next to bold/underline markup as smart quotes

With typography=2 a single-quoted phrase wrapped in strong or underline
markup (**'x'** / __'x'__) rendered apostrophes instead of opening and
closing quotes: the lexer matches against the full subject at a byte
offset, so the singlequoteopening lookbehind sees the consumed * or _
delimiter and fails, letting apostrophe win. Add * and _ to the quote
boundary set, as / (emphasis) already was, so the surrounding markup is
recognised as a word boundary.

show more ...

9a38b8db05-Jul-2026 Andreas Gohr <andi@splitbrain.org>

fix(parser): keep a mode's directly-assigned allowedModes when it also declares categories

setModeRegistry() replaced $this->allowedModes with the category-derived list
whenever a mode declared cate

fix(parser): keep a mode's directly-assigned allowedModes when it also declares categories

setModeRegistry() replaced $this->allowedModes with the category-derived list
whenever a mode declared categories, discarding any mode names the subclass had
assigned to the property directly. The old SyntaxPlugin::accepts() merged the
category modes into the existing list instead, so a mode using the
sibling-component pattern - a non-empty getAllowedTypes() plus
$this->allowedModes[] = 'plugin_foo_bar' in its constructor - kept both and its
sibling syntax nested as intended.

Merge the category-derived modes into the directly-assigned list rather than
replacing it, then deduplicate. The no-categories path is unchanged: the
directly-assigned list is used as-is.

show more ...

945681fc05-Jul-2026 Andreas Gohr <andi@splitbrain.org>

fix(parser): keep an indented list from being swallowed by a table

The parser rework dropped the list-awareness lookahead from preformatted's
entry patterns ('\n (?![\*\-])' became '\n '). In base

fix(parser): keep an indented list from being swallowed by a table

The parser rework dropped the list-awareness lookahead from preformatted's
entry patterns ('\n (?![\*\-])' became '\n '). In base mode this is masked
by sort order - listblock sorts before preformatted and wins the tie - but
table mode connects preformatted as a protected sub-mode without connecting
any list mode. Inside a table an indented list line therefore entered
preformatted instead of ending the table, and the table rewriter discarded the
resulting call: the list vanished from the output and the table's section-edit
range grew to cover it, so saving via the inline table editor overwrote the
list text.

Restore the lookahead. For DokuWiki syntax it is the original '(?![\*\-])'
(Listblock treats a bare * or - as a marker). For Markdown-preferred syntax the
guard follows GfmListblock, rejecting -, *, + and ordered markers only when
followed by whitespace or end of line, so mixed dw+md / md+dw wikis are fixed
too while an indented code block that merely starts with such a character (e.g.
a *** line) still parses as code.

show more ...

e248eb6f05-Jul-2026 Andreas Gohr <andi@splitbrain.org>

fix(parser): don't drop document content after a blank indented line

Preformatted's exit pattern (?=\n[^ \t\n]) is a lookahead-only exit: it
consumes no byte so the boundary \n stays in the stream f

fix(parser): don't drop document content after a blank indented line

Preformatted's exit pattern (?=\n[^ \t\n]) is a lookahead-only exit: it
consumes no byte so the boundary \n stays in the stream for a following block
mode (an <hr> or header after an indented code block) to anchor on.

When that exit fired with nothing else consumed - a "blank" line that is empty
after its indent, followed by a column-0 line - the match was zero-width at the
current offset and the lexer's no-advance guard aborted the whole parse,
silently discarding the rest of the document. Reachable on ordinary trailing
whitespace ("abc\n \nmore") and inside footnotes.

Exempt zero-width MODE_EXIT matches from the guard: popping the mode stack is
real progress and leaves the boundary byte for the parent mode to consume on
the next iteration. The stack strictly shrinks on each such exit, so this
cannot loop; the infinite-loop protection is unchanged for every other
zero-width match. Preformatted's pattern is left as-is, so <hr>/header after an
indented code block still works, including after a blank indented line.

Add regressions for the blank-line, blank-line-after-code, and
boundary-preservation (hr after a blank indented line) cases.

show more ...


/dokuwiki/README
/dokuwiki/_test/composer.lock
/dokuwiki/_test/rector.php
/dokuwiki/_test/tests/ChangeLog/PageChangeLogTest.php
/dokuwiki/_test/tests/DraftTest.php
/dokuwiki/_test/tests/Feed/FeedParserTest.php
/dokuwiki/_test/tests/Form/TextareaElementTest.php
/dokuwiki/_test/tests/MailUtilsTest.php
ParserMode/PreformattedTest.php
/dokuwiki/_test/tests/Remote/ApiCoreAclCheckTest.php
/dokuwiki/_test/tests/Search/BacklinksTest.php
/dokuwiki/_test/tests/Search/Collection/CollectionSearchTest.php
/dokuwiki/_test/tests/Search/Collection/LookupCollectionTest.php
/dokuwiki/_test/tests/Search/Index/LockTest.php
/dokuwiki/_test/tests/Search/Index/MemoryIndexTest.php
/dokuwiki/_test/tests/Search/Index/TupleOpsTest.php
/dokuwiki/_test/tests/Search/IndexerTest.php
/dokuwiki/_test/tests/Search/Query/QueryEvaluatorTest.php
/dokuwiki/_test/tests/Search/Query/QueryParserTest.php
/dokuwiki/_test/tests/Ui/PageDiffTest.php
/dokuwiki/_test/tests/inc/IpTest.php
/dokuwiki/_test/tests/inc/auth_mediaaclpath.test.php
/dokuwiki/_test/tests/inc/common_pageinfo.test.php
/dokuwiki/_test/tests/inc/httputils_xaccel.test.php
/dokuwiki/_test/tests/lib/exe/ajax_requests.test.php
/dokuwiki/composer.lock
/dokuwiki/data/deleted.files
/dokuwiki/data/pages/wiki/syntax.txt
/dokuwiki/inc/Action/Register.php
/dokuwiki/inc/Action/Subscribe.php
/dokuwiki/inc/Ajax.php
/dokuwiki/inc/Cache/CacheParser.php
/dokuwiki/inc/Cache/CacheRenderer.php
/dokuwiki/inc/ChangeLog/ChangeLog.php
/dokuwiki/inc/ChangeLog/MediaChangeLog.php
/dokuwiki/inc/ChangeLog/PageChangeLog.php
/dokuwiki/inc/Extension/AuthPlugin.php
/dokuwiki/inc/Extension/PluginTrait.php
/dokuwiki/inc/Feed/FeedParserFile.php
/dokuwiki/inc/File/MediaFile.php
/dokuwiki/inc/Form/TextareaElement.php
/dokuwiki/inc/Ip.php
/dokuwiki/inc/JpegMeta.php
/dokuwiki/inc/MailUtils.php
/dokuwiki/inc/Mailer.class.php
/dokuwiki/inc/Parsing/Helpers/Link.php
/dokuwiki/inc/Parsing/Lexer/Lexer.php
/dokuwiki/inc/Parsing/ModeRegistry.php
/dokuwiki/inc/Parsing/ParserMode/Emaillink.php
/dokuwiki/inc/Parsing/ParserMode/GfmQuote.php
/dokuwiki/inc/Remote/ApiCore.php
/dokuwiki/inc/Remote/JsonRpcServer.php
/dokuwiki/inc/Remote/LegacyApiCore.php
/dokuwiki/inc/Remote/Response/Media.php
/dokuwiki/inc/Remote/XmlRpcServer.php
/dokuwiki/inc/Search/Collection/AbstractCollection.php
/dokuwiki/inc/Search/Index/AbstractIndex.php
/dokuwiki/inc/Search/Index/Lock.php
/dokuwiki/inc/Search/Index/TupleOps.php
/dokuwiki/inc/Search/Indexer.php
/dokuwiki/inc/Search/LegacyIndexer.php
/dokuwiki/inc/Search/Query/QueryEvaluator.php
/dokuwiki/inc/Search/Tokenizer.php
/dokuwiki/inc/TaskRunner.php
/dokuwiki/inc/Ui/Diff.php
/dokuwiki/inc/Ui/Search.php
/dokuwiki/inc/auth.php
/dokuwiki/inc/changelog.php
/dokuwiki/inc/common.php
/dokuwiki/inc/deprecated.php
/dokuwiki/inc/fetch.functions.php
/dokuwiki/inc/httputils.php
/dokuwiki/inc/infoutils.php
/dokuwiki/inc/init.php
/dokuwiki/inc/lang/cs/lang.php
/dokuwiki/inc/lang/ro/lang.php
/dokuwiki/inc/lang/ro/locked.txt
/dokuwiki/inc/lang/ro/mailtext.txt
/dokuwiki/inc/lang/ro/newpage.txt
/dokuwiki/inc/lang/ro/onceexisted.txt
/dokuwiki/inc/lang/ro/password.txt
/dokuwiki/inc/lang/ro/registermail.txt
/dokuwiki/inc/lang/ro/resendpwd.txt
/dokuwiki/inc/lang/ro/resetpwd.txt
/dokuwiki/inc/lang/ro/subscr_digest.txt
/dokuwiki/inc/lang/ro/subscr_list.txt
/dokuwiki/inc/lang/ro/subscr_single.txt
/dokuwiki/inc/lang/ro/uploadmail.txt
/dokuwiki/inc/lang/sk/lang.php
/dokuwiki/inc/load.php
/dokuwiki/inc/media.php
/dokuwiki/inc/parser/metadata.php
/dokuwiki/inc/parser/xhtml.php
/dokuwiki/inc/search.php
/dokuwiki/lib/exe/css.php
/dokuwiki/lib/exe/detail.php
/dokuwiki/lib/exe/js.php
/dokuwiki/lib/plugins/acl/admin.php
/dokuwiki/lib/plugins/acl/lang/ro/help.txt
/dokuwiki/lib/plugins/acl/lang/ro/lang.php
/dokuwiki/lib/plugins/authad/auth.php
/dokuwiki/lib/plugins/authad/lang/ro/lang.php
/dokuwiki/lib/plugins/authad/lang/sk/settings.php
/dokuwiki/lib/plugins/authldap/auth.php
/dokuwiki/lib/plugins/authldap/lang/sk/settings.php
/dokuwiki/lib/plugins/authpdo/auth.php
/dokuwiki/lib/plugins/authplain/_test/userdata.test.php
/dokuwiki/lib/plugins/authplain/auth.php
/dokuwiki/lib/plugins/config/core/Setting/Setting.php
/dokuwiki/lib/plugins/config/core/Setting/SettingArray.php
/dokuwiki/lib/plugins/config/core/Setting/SettingEmail.php
/dokuwiki/lib/plugins/config/core/Setting/SettingImConvert.php
/dokuwiki/lib/plugins/config/core/Setting/SettingMulticheckbox.php
/dokuwiki/lib/plugins/config/core/Setting/SettingMultichoice.php
/dokuwiki/lib/plugins/config/core/Setting/SettingOnoff.php
/dokuwiki/lib/plugins/config/core/Setting/SettingSavedir.php
/dokuwiki/lib/plugins/config/core/Setting/SettingString.php
/dokuwiki/lib/plugins/config/lang/cs/lang.php
/dokuwiki/lib/plugins/config/lang/de/lang.php
/dokuwiki/lib/plugins/config/lang/fr/lang.php
/dokuwiki/lib/plugins/config/lang/pl/lang.php
/dokuwiki/lib/plugins/config/lang/ro/intro.txt
/dokuwiki/lib/plugins/config/lang/ro/lang.php
/dokuwiki/lib/plugins/config/lang/sk/lang.php
/dokuwiki/lib/plugins/extension/Extension.php
/dokuwiki/lib/plugins/extension/_test/ExtensionTest.php
/dokuwiki/lib/plugins/extension/_test/testdata/evilbase/plugin.info.txt
/dokuwiki/lib/plugins/extension/lang/sk/lang.php
/dokuwiki/lib/plugins/logviewer/lang/sk/intro.txt
/dokuwiki/lib/plugins/logviewer/lang/sk/lang.php
/dokuwiki/lib/plugins/logviewer/lang/sk/nolog.txt
/dokuwiki/lib/plugins/popularity/admin.php
/dokuwiki/lib/plugins/popularity/lang/ro/intro.txt
/dokuwiki/lib/plugins/revert/admin.php
/dokuwiki/lib/plugins/revert/lang/ro/intro.txt
/dokuwiki/lib/plugins/revert/lang/ro/lang.php
/dokuwiki/lib/plugins/styling/_test/general.test.php
/dokuwiki/lib/plugins/usermanager/admin.php
/dokuwiki/lib/plugins/usermanager/lang/cs/lang.php
/dokuwiki/lib/plugins/usermanager/lang/ro/delete.txt
/dokuwiki/lib/plugins/usermanager/lang/ro/intro.txt
/dokuwiki/lib/plugins/usermanager/lang/ro/lang.php
/dokuwiki/lib/plugins/usermanager/lang/sk/lang.php
/dokuwiki/lib/plugins/usermanager/remote.php
/dokuwiki/lib/scripts/locktimer.js
/dokuwiki/lib/scripts/media.js
/dokuwiki/vendor/composer/installed.json
/dokuwiki/vendor/composer/installed.php
/dokuwiki/vendor/phpseclib/phpseclib/README.md
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PKCS1.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/PublicKey.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/File/X509.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php
/dokuwiki/vendor/splitbrain/php-archive/src/Zip.php
4b31eadf04-Jun-2026 Andreas Gohr <gohr@cosmocode.de>

fix (parsing): avoid newline loss on GFM section editing

The GFM header parsing returned a byte position pointing at the newline
before the actual header resulting in the observed newline eatings as

fix (parsing): avoid newline loss on GFM section editing

The GFM header parsing returned a byte position pointing at the newline
before the actual header resulting in the observed newline eatings as
reported in https://github.com/dokuwiki/dokuwiki/pull/4636#issuecomment-4491970909

Additionally this fixes an oddity of DW header parsing which
accidentally allowed text on the line before the opening = chars.
Whitespace is still allowed.

show more ...

2e43b79904-Jun-2026 Andreas Gohr <gohr@cosmocode.de>

Render locale and plugin-bundled text as DokuWiki syntax

Static "intro" text shipped with DokuWiki, templates and plugins —
inc/lang/*/*.txt, template locale files, each plugin's lang/<lc>/*.txt —
i

Render locale and plugin-bundled text as DokuWiki syntax

Static "intro" text shipped with DokuWiki, templates and plugins —
inc/lang/*/*.txt, template locale files, each plugin's lang/<lc>/*.txt —
is authored in DokuWiki syntax. It is a core/plugin asset, not user
content. When an admin configures the wiki for Markdown the DW link and
monospace modes are not loaded, so these files render as literal text:
[[wiki:syntax]] and ''Save'' pairs survive into the HTML.

Pin those entry points to the 'dw' flavour via the override added in the
previous commit:

- p_locale_xhtml() and tpl_locale_xhtml() pass 'dw'.
- PluginTrait::locale_xhtml() passes 'dw'.
- PluginTrait::render_text() / PluginInterface::render_text() gain a
$syntax parameter defaulting to 'dw'. The default is 'dw', not null,
because the method predates GFM and its callers pass DW-syntax strings;
plugins rendering user content opt back into the configured syntax with
render_text($text, 'xhtml', null).

Locale output is now deterministic across a syntax switch, so its caches
get over-invalidated but never under-invalidated — acceptable, as the
locale render path is rare and cheap.

show more ...

16999ed104-Jun-2026 Andreas Gohr <gohr@cosmocode.de>

parserutils: allow callers to override the parse syntax, key cache on it

With the registry now carrying the flavour as a parameter, expose that
to callers: p_get_instructions(), p_cached_instruction

parserutils: allow callers to override the parse syntax, key cache on it

With the registry now carrying the flavour as a parameter, expose that
to callers: p_get_instructions(), p_cached_instructions() and
p_cached_output() gain an optional $syntax argument. null (the default)
means "use the configured $conf['syntax']", preserving behaviour for
every existing call site; an explicit flavour parses under it regardless
of the wiki's configured preference.

This is what lets bundled assets render deterministically — e.g. a
plugin forcing 'dw' on a document whose configured syntax is 'md'.

Because that case renders the same file under two flavours within one
request, key both the in-request memo (the $run map) and the on-disk
cache on $syntax so the two do not collide. The syntax enters the cache
key only when passed explicitly (non-null); when null the key is
unchanged, so existing caches are untouched. Plumbed through new
optional $syntax args on CacheParser / CacheInstructions, appended to
the key string.

show more ...

47a02a1004-Jun-2026 Andreas Gohr <gohr@cosmocode.de>

Parsing: make parse syntax a per-parse value, drop ModeInterface

The active parse's syntax flavour is a per-parse question, not process-
global state: within a single request a plugin can render bun

Parsing: make parse syntax a per-parse value, drop ModeInterface

The active parse's syntax flavour is a per-parse question, not process-
global state: within a single request a plugin can render bundled
DokuWiki-syntax text inside an otherwise-Markdown page. Yet ModeRegistry
was a singleton that read $conf['syntax'] and the $PARSER_MODES global,
and every mode reached it through ModeRegistry::getInstance() — so the
flavour lived in shared mutable state that two parses in one request
would fight over.

Make the registry a short-lived value instead:

- ModeRegistry is constructed once per parse with an explicit $syntax
and injected into Parser, Handler and every mode. getSyntax() /
isDwPreferred() / isMdPreferred() consult $this->syntax; the
DOKU_UNITTEST-gated mode-list cache hack is gone (each registry is
fresh, nothing to invalidate).
- p_get_instructions() is now the single place in the pipeline where
$conf['syntax'] is read; from there the flavour travels as a
parameter. No code under inc/Parsing/ reads $conf['syntax'] directly
anymore — the five syntax-reading modes (Preformatted, GfmHr,
GfmEscape, Externallink, GfmQuote) route through $this->registry.

Keep the two concepts apart, as documented in the ModeRegistry and
AbstractMode docblocks: the user's configured *preference* stays in
$conf['syntax'] for UI code (toolbar, settings), while the active
parse's syntax is a parameter carried by the registry.

$PARSER_MODES is demoted to a deprecated, read-only mirror, published
during loadPluginModes() — third-party syntax plugins (columnlist,
alphalist2, phpwikify, skipentity) and the bundled info plugin read the
global directly, often from their constructors, so the taxonomy must
stay visible there. No core code reads the mirror.

Fold ModeInterface into AbstractMode while here: getSort()/handle() are
abstract, the connect callbacks carry defaults, and the public $Lexer
"FIXME should be done by setter" becomes setLexer()/getLexer() injected
by Parser::addMode() alongside the registry. Nested-content resolution
moves to the allowedCategories()/filterAllowedModes() hooks, resolved
once when the registry is attached.

Tests build their own parser/registry through ParserTestBase::setSyntax()
instead of mutating $conf and calling the removed ModeRegistry::reset().

show more ...


/dokuwiki/_test/bootstrap.php
HandlerTest.php
Lexer/RecordingHandler.php
Markdown/GfmSpecTest.php
ModeRegistryTest.php
ParserMode/ExternallinkTest.php
ParserMode/GfmBacktickDoubleTest.php
ParserMode/GfmBacktickSingleTest.php
ParserMode/GfmCodeTest.php
ParserMode/GfmDeletedTest.php
ParserMode/GfmEmphasisStrongTest.php
ParserMode/GfmEmphasisStrongUnderscoreTest.php
ParserMode/GfmEmphasisTest.php
ParserMode/GfmEmphasisUnderscoreTest.php
ParserMode/GfmEscapeTest.php
ParserMode/GfmFileTest.php
ParserMode/GfmHeaderTest.php
ParserMode/GfmHrTest.php
ParserMode/GfmLinebreakTest.php
ParserMode/GfmLinkTest.php
ParserMode/GfmListblockTest.php
ParserMode/GfmMediaTest.php
ParserMode/GfmQuoteTest.php
ParserMode/GfmStrongUnderscoreTest.php
ParserMode/ParserTestBase.php
ParserMode/PreformattedTest.php
/dokuwiki/inc/Extension/SyntaxPlugin.php
/dokuwiki/inc/Parsing/Handler.php
/dokuwiki/inc/Parsing/ModeRegistry.php
/dokuwiki/inc/Parsing/Parser.php
/dokuwiki/inc/Parsing/ParserMode/AbstractFormatting.php
/dokuwiki/inc/Parsing/ParserMode/AbstractMode.php
/dokuwiki/inc/Parsing/ParserMode/Base.php
/dokuwiki/inc/Parsing/ParserMode/Eol.php
/dokuwiki/inc/Parsing/ParserMode/Externallink.php
/dokuwiki/inc/Parsing/ParserMode/Footnote.php
/dokuwiki/inc/Parsing/ParserMode/GfmBacktickSingle.php
/dokuwiki/inc/Parsing/ParserMode/GfmCode.php
/dokuwiki/inc/Parsing/ParserMode/GfmEscape.php
/dokuwiki/inc/Parsing/ParserMode/GfmHr.php
/dokuwiki/inc/Parsing/ParserMode/GfmHtmlEntity.php
/dokuwiki/inc/Parsing/ParserMode/GfmListblock.php
/dokuwiki/inc/Parsing/ParserMode/GfmQuote.php
/dokuwiki/inc/Parsing/ParserMode/GfmTable.php
/dokuwiki/inc/Parsing/ParserMode/Listblock.php
/dokuwiki/inc/Parsing/ParserMode/Preformatted.php
/dokuwiki/inc/Parsing/ParserMode/Table.php
/dokuwiki/inc/deprecated.php
/dokuwiki/inc/parserutils.php
4f32c45b26-May-2026 Andreas Gohr <gohr@cosmocode.de>

GfmLink: allow soft line break inside link text

The label character class explicitly forbade `\n`, so a CommonMark
soft line break inside link text (e.g. `[link with<EOL>more](url)`)
fell through to

GfmLink: allow soft line break inside link text

The label character class explicitly forbade `\n`, so a CommonMark
soft line break inside link text (e.g. `[link with<EOL>more](url)`)
fell through to literal text instead of producing a link. Loosen the
class to accept a bare `\n` as long as it is not followed by a blank
line — soft breaks are spec-allowed inside link text, blank lines are
not, and refusing them also keeps `\n#`-anchored block modes (header,
hr, ...) from being swallowed by a runaway link match.

The `\n` survives into the label string and renders as a literal line
ending in HTML, which browsers display as a single space. This soft
break behavior has been checked against
https://spec.commonmark.org/dingus/

Note that this behavior differs from github where the line break is
rendered as a hard break <br>.

show more ...

65dd204226-May-2026 Andreas Gohr <gohr@cosmocode.de>

GfmEscape: defer \\<EOL> to DW Linebreak in mixed-syntax modes

Both GfmEscape (sort 5) and DW Linebreak (sort 140) can claim the
two backslashes of `\\` followed by space/tab/newline. The lexer's
ti

GfmEscape: defer \\<EOL> to DW Linebreak in mixed-syntax modes

Both GfmEscape (sort 5) and DW Linebreak (sort 140) can claim the
two backslashes of `\\` followed by space/tab/newline. The lexer's
tie-breaker picked GfmEscape, so DW's forced linebreak silently lost
its delimiter under dw+md and md+dw. Add a negative lookahead that
declines `\\[ \t\n]` whenever DW syntax is loaded — pure md keeps
GFM-spec behavior. Mid-line `\\` (UNC paths etc.) still escapes.

show more ...

36ba8ead12-May-2026 Andreas Gohr <andi@splitbrain.org>

test: add tests to catch #4637

Issue #4637 was fixed in 7686f2030b19f948d2e50df1613ef6592fa44b46 but I
didn't like that no test had caught the issue.

This adds a specific test for the issue as a Ha

test: add tests to catch #4637

Issue #4637 was fixed in 7686f2030b19f948d2e50df1613ef6592fa44b46 but I
didn't like that no test had caught the issue.

This adds a specific test for the issue as a HandlerTest. Additionally a
simple smoke test is added that renders the wiki:syntax page and
inspects the created DOM. It's not comprehensive but might help flagging
similar issue in the future.

show more ...


/dokuwiki/_test/core/DokuWikiTest.php
/dokuwiki/_test/data/media/wiki/exif-orient-6.jpg
/dokuwiki/_test/tests/Feed/FeedCreatorOptionsTest.php
/dokuwiki/_test/tests/File/MediaFileTest.php
HandlerTest.php
/dokuwiki/_test/tests/Remote/ApiCoreTest.php
/dokuwiki/_test/tests/Search/BacklinksTest.php
/dokuwiki/_test/tests/Search/Collection/CollectionSearchTest.php
/dokuwiki/_test/tests/Search/Collection/DirectCollectionTest.php
/dokuwiki/_test/tests/Search/Collection/FrequencyCollectionTest.php
/dokuwiki/_test/tests/Search/Collection/LookupCollectionTest.php
/dokuwiki/_test/tests/Search/Collection/MockDirectCollection.php
/dokuwiki/_test/tests/Search/Collection/MockFrequencyCollection.php
/dokuwiki/_test/tests/Search/Collection/MockLookupCollection.php
/dokuwiki/_test/tests/Search/Collection/TermTest.php
/dokuwiki/_test/tests/Search/Index/AbstractIndexTestCase.php
/dokuwiki/_test/tests/Search/Index/FileIndexTest.php
/dokuwiki/_test/tests/Search/Index/LockTest.php
/dokuwiki/_test/tests/Search/Index/MemoryIndexTest.php
/dokuwiki/_test/tests/Search/Index/TupleOpsTest.php
/dokuwiki/_test/tests/Search/IndexerTest.php
/dokuwiki/_test/tests/Search/IntegrityTest.php
/dokuwiki/_test/tests/Search/MediauseTest.php
/dokuwiki/_test/tests/Search/MetadataSearchTest.php
/dokuwiki/_test/tests/Search/Query/NamespacePredicateTest.php
/dokuwiki/_test/tests/Search/Query/PageSetTest.php
/dokuwiki/_test/tests/Search/Query/QueryEvaluatorTest.php
/dokuwiki/_test/tests/Search/Query/QueryParserTest.php
/dokuwiki/_test/tests/Search/data/searchtest.txt
/dokuwiki/_test/tests/Ui/Media/DisplayTest.php
/dokuwiki/_test/tests/inc/IpTest.php
/dokuwiki/_test/tests/inc/changelog_getrelativerevision.test.php
/dokuwiki/_test/tests/inc/common_clientip.test.php
/dokuwiki/_test/tests/inc/common_saveWikiText.test.php
/dokuwiki/_test/tests/inc/io_createnamespace.test.php
/dokuwiki/_test/tests/inc/parser/renderer_pipeline.test.php
/dokuwiki/_test/tests/lib/exe/fetch_imagetoken.test.php
/dokuwiki/bin/indexer.php
/dokuwiki/composer.json
/dokuwiki/composer.lock
/dokuwiki/conf/dokuwiki.php
/dokuwiki/data/deleted.files
/dokuwiki/feed.php
/dokuwiki/inc/Action/Preview.php
/dokuwiki/inc/Action/Search.php
/dokuwiki/inc/Ajax.php
/dokuwiki/inc/ChangeLog/ChangeLog.php
/dokuwiki/inc/ChangeLog/MediaChangeLog.php
/dokuwiki/inc/ChangeLog/PageChangeLog.php
/dokuwiki/inc/Feed/FeedCreator.php
/dokuwiki/inc/Feed/FeedCreatorOptions.php
/dokuwiki/inc/File/MediaFile.php
/dokuwiki/inc/File/PageFile.php
/dokuwiki/inc/Ip.php
/dokuwiki/inc/Parsing/Handler.php
/dokuwiki/inc/Parsing/ModeRegistry.php
/dokuwiki/inc/Parsing/ParserMode/AbstractFormatting.php
/dokuwiki/inc/Parsing/ParserMode/Base.php
/dokuwiki/inc/Parsing/ParserMode/Footnote.php
/dokuwiki/inc/Parsing/ParserMode/Listblock.php
/dokuwiki/inc/Parsing/ParserMode/Quote.php
/dokuwiki/inc/Parsing/ParserMode/Table.php
/dokuwiki/inc/Remote/ApiCore.php
/dokuwiki/inc/Search/Collection/AbstractCollection.php
/dokuwiki/inc/Search/Collection/CollectionSearch.php
/dokuwiki/inc/Search/Collection/DirectCollection.php
/dokuwiki/inc/Search/Collection/FrequencyCollection.php
/dokuwiki/inc/Search/Collection/LookupCollection.php
/dokuwiki/inc/Search/Collection/PageFulltextCollection.php
/dokuwiki/inc/Search/Collection/PageMetaCollection.php
/dokuwiki/inc/Search/Collection/PageTitleCollection.php
/dokuwiki/inc/Search/Collection/Term.php
/dokuwiki/inc/Search/Exception/IndexAccessException.php
/dokuwiki/inc/Search/Exception/IndexIntegrityException.php
/dokuwiki/inc/Search/Exception/IndexLockException.php
/dokuwiki/inc/Search/Exception/IndexUsageException.php
/dokuwiki/inc/Search/Exception/IndexWriteException.php
/dokuwiki/inc/Search/Exception/SearchException.php
/dokuwiki/inc/Search/FulltextSearch.php
/dokuwiki/inc/Search/Index/AbstractIndex.php
/dokuwiki/inc/Search/Index/FileIndex.php
/dokuwiki/inc/Search/Index/Lock.php
/dokuwiki/inc/Search/Index/MemoryIndex.php
/dokuwiki/inc/Search/Index/TupleOps.php
/dokuwiki/inc/Search/Indexer.php
/dokuwiki/inc/Search/MetadataSearch.php
/dokuwiki/inc/Search/Query/NamespacePredicate.php
/dokuwiki/inc/Search/Query/NegatedEntry.php
/dokuwiki/inc/Search/Query/PageSet.php
/dokuwiki/inc/Search/Query/QueryEvaluator.php
/dokuwiki/inc/Search/Query/QueryParser.php
/dokuwiki/inc/Search/Query/StackEntry.php
/dokuwiki/inc/Search/Tokenizer.php
/dokuwiki/inc/Sitemap/Mapper.php
/dokuwiki/inc/Subscriptions/BulkSubscriptionSender.php
/dokuwiki/inc/TaskRunner.php
/dokuwiki/inc/Ui/Backlinks.php
/dokuwiki/inc/Ui/Media/Display.php
/dokuwiki/inc/Ui/MediaDiff.php
/dokuwiki/inc/Ui/Search.php
/dokuwiki/inc/Ui/SearchState.php
/dokuwiki/inc/common.php
/dokuwiki/inc/deprecated.php
/dokuwiki/inc/html.php
/dokuwiki/inc/infoutils.php
/dokuwiki/inc/io.php
/dokuwiki/inc/lang/fr/lang.php
/dokuwiki/inc/lang/pl/lang.php
/dokuwiki/inc/lang/tr/lang.php
/dokuwiki/inc/lang/tr/onceexisted.txt
/dokuwiki/inc/load.php
/dokuwiki/inc/media.php
/dokuwiki/inc/search.php
/dokuwiki/inc/template.php
/dokuwiki/lib/exe/fetch.php
/dokuwiki/lib/plugins/authldap/lang/tr/settings.php
/dokuwiki/lib/plugins/authpdo/lang/tr/lang.php
/dokuwiki/lib/plugins/authplain/lang/tr/lang.php
/dokuwiki/lib/plugins/config/lang/cs/lang.php
/dokuwiki/lib/plugins/config/lang/de/lang.php
/dokuwiki/lib/plugins/config/lang/en/lang.php
/dokuwiki/lib/plugins/config/lang/es/lang.php
/dokuwiki/lib/plugins/config/lang/fr/lang.php
/dokuwiki/lib/plugins/config/lang/hu/lang.php
/dokuwiki/lib/plugins/config/lang/it/lang.php
/dokuwiki/lib/plugins/config/lang/pl/lang.php
/dokuwiki/lib/plugins/config/lang/pt/lang.php
/dokuwiki/lib/plugins/config/lang/tr/lang.php
/dokuwiki/lib/plugins/config/settings/config.metadata.php
/dokuwiki/lib/plugins/extension/lang/tr/lang.php
/dokuwiki/lib/plugins/info/syntax.php
/dokuwiki/lib/scripts/page.js
/dokuwiki/lib/scripts/toolbar.js
/dokuwiki/lib/tpl/dokuwiki/detail.php
/dokuwiki/vendor/composer/installed.json
/dokuwiki/vendor/composer/installed.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/OpenSSH.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php
/dokuwiki/vendor/splitbrain/slika/README.md
/dokuwiki/vendor/splitbrain/slika/src/GdAdapter.php
/dokuwiki/vendor/splitbrain/slika/src/ImageInfo.php
8a34b0d812-May-2026 Andreas Gohr <andi@splitbrain.org>

remove comment about failing tests now that the work is complete

d331a83912-May-2026 Andreas Gohr <andi@splitbrain.org>

GFM modes: follow CATEGORY_SUBSTITION → CATEGORY_SUBSTITUTION rename

Constant was renamed on master (the typo'd 'substition' value is kept,
but the constant name spells it correctly). Update GfmTabl

GFM modes: follow CATEGORY_SUBSTITION → CATEGORY_SUBSTITUTION rename

Constant was renamed on master (the typo'd 'substition' value is kept,
but the constant name spells it correctly). Update GfmTable's use of
the constant, plus stale docblock/comment references in GfmEscape,
GfmHtmlEntity, GfmLinebreak, and GfmLinebreakTest.

show more ...


/dokuwiki/_test/core/DokuWikiTest.php
/dokuwiki/_test/data/media/wiki/exif-orient-6.jpg
/dokuwiki/_test/tests/Feed/FeedCreatorOptionsTest.php
/dokuwiki/_test/tests/File/MediaFileTest.php
ParserMode/GfmLinebreakTest.php
/dokuwiki/_test/tests/Remote/ApiCoreTest.php
/dokuwiki/_test/tests/Search/BacklinksTest.php
/dokuwiki/_test/tests/Search/Collection/CollectionSearchTest.php
/dokuwiki/_test/tests/Search/Collection/DirectCollectionTest.php
/dokuwiki/_test/tests/Search/Collection/FrequencyCollectionTest.php
/dokuwiki/_test/tests/Search/Collection/LookupCollectionTest.php
/dokuwiki/_test/tests/Search/Collection/MockDirectCollection.php
/dokuwiki/_test/tests/Search/Collection/MockFrequencyCollection.php
/dokuwiki/_test/tests/Search/Collection/MockLookupCollection.php
/dokuwiki/_test/tests/Search/Collection/TermTest.php
/dokuwiki/_test/tests/Search/Index/AbstractIndexTestCase.php
/dokuwiki/_test/tests/Search/Index/FileIndexTest.php
/dokuwiki/_test/tests/Search/Index/LockTest.php
/dokuwiki/_test/tests/Search/Index/MemoryIndexTest.php
/dokuwiki/_test/tests/Search/Index/TupleOpsTest.php
/dokuwiki/_test/tests/Search/IndexerTest.php
/dokuwiki/_test/tests/Search/IntegrityTest.php
/dokuwiki/_test/tests/Search/MediauseTest.php
/dokuwiki/_test/tests/Search/MetadataSearchTest.php
/dokuwiki/_test/tests/Search/Query/NamespacePredicateTest.php
/dokuwiki/_test/tests/Search/Query/PageSetTest.php
/dokuwiki/_test/tests/Search/Query/QueryEvaluatorTest.php
/dokuwiki/_test/tests/Search/Query/QueryParserTest.php
/dokuwiki/_test/tests/Search/data/searchtest.txt
/dokuwiki/_test/tests/Ui/Media/DisplayTest.php
/dokuwiki/_test/tests/inc/IpTest.php
/dokuwiki/_test/tests/inc/changelog_getrelativerevision.test.php
/dokuwiki/_test/tests/inc/common_clientip.test.php
/dokuwiki/_test/tests/inc/common_saveWikiText.test.php
/dokuwiki/_test/tests/inc/io_createnamespace.test.php
/dokuwiki/_test/tests/lib/exe/fetch_imagetoken.test.php
/dokuwiki/bin/indexer.php
/dokuwiki/composer.json
/dokuwiki/composer.lock
/dokuwiki/conf/dokuwiki.php
/dokuwiki/data/deleted.files
/dokuwiki/feed.php
/dokuwiki/inc/Action/Preview.php
/dokuwiki/inc/Action/Search.php
/dokuwiki/inc/Ajax.php
/dokuwiki/inc/ChangeLog/ChangeLog.php
/dokuwiki/inc/ChangeLog/MediaChangeLog.php
/dokuwiki/inc/ChangeLog/PageChangeLog.php
/dokuwiki/inc/Feed/FeedCreator.php
/dokuwiki/inc/Feed/FeedCreatorOptions.php
/dokuwiki/inc/File/MediaFile.php
/dokuwiki/inc/File/PageFile.php
/dokuwiki/inc/Ip.php
/dokuwiki/inc/Parsing/Handler.php
/dokuwiki/inc/Parsing/ModeRegistry.php
/dokuwiki/inc/Parsing/ParserMode/AbstractFormatting.php
/dokuwiki/inc/Parsing/ParserMode/Base.php
/dokuwiki/inc/Parsing/ParserMode/Footnote.php
/dokuwiki/inc/Parsing/ParserMode/GfmEscape.php
/dokuwiki/inc/Parsing/ParserMode/GfmHtmlEntity.php
/dokuwiki/inc/Parsing/ParserMode/GfmLinebreak.php
/dokuwiki/inc/Parsing/ParserMode/GfmTable.php
/dokuwiki/inc/Parsing/ParserMode/Listblock.php
/dokuwiki/inc/Parsing/ParserMode/Table.php
/dokuwiki/inc/Remote/ApiCore.php
/dokuwiki/inc/Search/Collection/AbstractCollection.php
/dokuwiki/inc/Search/Collection/CollectionSearch.php
/dokuwiki/inc/Search/Collection/DirectCollection.php
/dokuwiki/inc/Search/Collection/FrequencyCollection.php
/dokuwiki/inc/Search/Collection/LookupCollection.php
/dokuwiki/inc/Search/Collection/PageFulltextCollection.php
/dokuwiki/inc/Search/Collection/PageMetaCollection.php
/dokuwiki/inc/Search/Collection/PageTitleCollection.php
/dokuwiki/inc/Search/Collection/Term.php
/dokuwiki/inc/Search/Exception/IndexAccessException.php
/dokuwiki/inc/Search/Exception/IndexIntegrityException.php
/dokuwiki/inc/Search/Exception/IndexLockException.php
/dokuwiki/inc/Search/Exception/IndexUsageException.php
/dokuwiki/inc/Search/Exception/IndexWriteException.php
/dokuwiki/inc/Search/Exception/SearchException.php
/dokuwiki/inc/Search/FulltextSearch.php
/dokuwiki/inc/Search/Index/AbstractIndex.php
/dokuwiki/inc/Search/Index/FileIndex.php
/dokuwiki/inc/Search/Index/Lock.php
/dokuwiki/inc/Search/Index/MemoryIndex.php
/dokuwiki/inc/Search/Index/TupleOps.php
/dokuwiki/inc/Search/Indexer.php
/dokuwiki/inc/Search/MetadataSearch.php
/dokuwiki/inc/Search/Query/NamespacePredicate.php
/dokuwiki/inc/Search/Query/NegatedEntry.php
/dokuwiki/inc/Search/Query/PageSet.php
/dokuwiki/inc/Search/Query/QueryEvaluator.php
/dokuwiki/inc/Search/Query/QueryParser.php
/dokuwiki/inc/Search/Query/StackEntry.php
/dokuwiki/inc/Search/Tokenizer.php
/dokuwiki/inc/Sitemap/Mapper.php
/dokuwiki/inc/Subscriptions/BulkSubscriptionSender.php
/dokuwiki/inc/TaskRunner.php
/dokuwiki/inc/Ui/Backlinks.php
/dokuwiki/inc/Ui/Media/Display.php
/dokuwiki/inc/Ui/MediaDiff.php
/dokuwiki/inc/Ui/Search.php
/dokuwiki/inc/Ui/SearchState.php
/dokuwiki/inc/common.php
/dokuwiki/inc/deprecated.php
/dokuwiki/inc/html.php
/dokuwiki/inc/infoutils.php
/dokuwiki/inc/io.php
/dokuwiki/inc/lang/fr/lang.php
/dokuwiki/inc/lang/pl/lang.php
/dokuwiki/inc/lang/tr/lang.php
/dokuwiki/inc/lang/tr/onceexisted.txt
/dokuwiki/inc/load.php
/dokuwiki/inc/media.php
/dokuwiki/inc/search.php
/dokuwiki/inc/template.php
/dokuwiki/lib/exe/fetch.php
/dokuwiki/lib/plugins/authldap/lang/tr/settings.php
/dokuwiki/lib/plugins/authpdo/lang/tr/lang.php
/dokuwiki/lib/plugins/authplain/lang/tr/lang.php
/dokuwiki/lib/plugins/config/lang/cs/lang.php
/dokuwiki/lib/plugins/config/lang/de/lang.php
/dokuwiki/lib/plugins/config/lang/en/lang.php
/dokuwiki/lib/plugins/config/lang/es/lang.php
/dokuwiki/lib/plugins/config/lang/fr/lang.php
/dokuwiki/lib/plugins/config/lang/hu/lang.php
/dokuwiki/lib/plugins/config/lang/it/lang.php
/dokuwiki/lib/plugins/config/lang/pl/lang.php
/dokuwiki/lib/plugins/config/lang/pt/lang.php
/dokuwiki/lib/plugins/config/lang/tr/lang.php
/dokuwiki/lib/plugins/config/settings/config.metadata.php
/dokuwiki/lib/plugins/extension/lang/tr/lang.php
/dokuwiki/lib/plugins/info/syntax.php
/dokuwiki/lib/scripts/page.js
/dokuwiki/lib/scripts/toolbar.js
/dokuwiki/lib/tpl/dokuwiki/detail.php
/dokuwiki/vendor/composer/installed.json
/dokuwiki/vendor/composer/installed.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/OpenSSH.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php
/dokuwiki/vendor/splitbrain/slika/README.md
/dokuwiki/vendor/splitbrain/slika/src/GdAdapter.php
/dokuwiki/vendor/splitbrain/slika/src/ImageInfo.php
465aec6712-May-2026 Andreas Gohr <andi@splitbrain.org>

Parsing tests: split LinksTest into per-ParserMode files

Replaces the monolithic LinksTest with one test class per ParserMode:
CamelcaselinkTest, EmaillinkTest, ExternallinkTest, FilelinkTest,
Inter

Parsing tests: split LinksTest into per-ParserMode files

Replaces the monolithic LinksTest with one test class per ParserMode:
CamelcaselinkTest, EmaillinkTest, ExternallinkTest, FilelinkTest,
InternallinkTest, WindowssharelinkTest. Media-parser dispatch tests
move into the existing MediaTest alongside the audio/video coverage.

ExternallinkTest also adds unit coverage for the GFM autolink
extension trim step: balanced parens, trailing entity refs (valid
named, numeric, and unknown round-trip), non-trailing entities staying
inside the URL, and mixed paren/entity peeling.

show more ...

aa346d4b12-May-2026 Andreas Gohr <andi@splitbrain.org>

GfmSpecTest: clear acronym table in spec renderer

The default conf/acronyms.conf entries (notably FTP) get wrapped in
<abbr> by the XHTML renderer's acronym() call, which the spec output
never has.

GfmSpecTest: clear acronym table in spec renderer

The default conf/acronyms.conf entries (notably FTP) get wrapped in
<abbr> by the XHTML renderer's acronym() call, which the spec output
never has. Clearing the renderer's acronym table makes acronym() fall
through to literal text, mirroring how typography substitutions are
already neutralized via SpecCompatRenderer. Brings example #628 to
passing without touching production wiki rendering.

show more ...

1beb745012-May-2026 Andreas Gohr <andi@splitbrain.org>

GfmSpecTest: skip deferred-feature spec cases

Heading-inline syntax (#36, #46) is deferred; the existing header
instruction and downstream renderers would need rework to process
inline modes inside

GfmSpecTest: skip deferred-feature spec cases

Heading-inline syntax (#36, #46) is deferred; the existing header
instruction and downstream renderers would need rework to process
inline modes inside heading content.

Bare URL autolinking without angle brackets (#619) is a deliberate
DokuWiki feature in Externallink, not a feature we'll remove to match
the strict CommonMark §6.8 rule.

The GFM bare-email autolink extension (#629-631) is out of scope -
DokuWiki's Email mode only recognises emails inside angle brackets.

show more ...

0f69437605-May-2026 Andreas Gohr <gohr@cosmocode.de>

GfmLink: accept escaped brackets inside link labels

The label slot used `[^\[\]\n]+`, which rejected `\[` / `\]` and
left labels with escaped brackets unmatched. Promote it to
`(?:\\.|[^\[\]\n])+` —

GfmLink: accept escaped brackets inside link labels

The label slot used `[^\[\]\n]+`, which rejected `\[` / `\]` and
left labels with escaped brackets unmatched. Promote it to
`(?:\\.|[^\[\]\n])+` — the same backslash-escape trick the URL
slot already uses — so spec example 523 (`[link \[bar](/uri)`)
matches and unescapes cleanly. The image-as-label sub-pattern
gets the same upgrade.

handle() needs no change: the new class still rejects bare `]`,
so the first literal `](` in the match is still the separator;
Escape::unescapeBackslashes() was already collapsing `\[` to `[`
before the label reached the link handler.

Adds two GfmLinkTest cases for the `\[` / `\]` forms.

show more ...

113171bb05-May-2026 Andreas Gohr <gohr@cosmocode.de>

Preformatted: strip leading/trailing blank-line padding from body

The lexer's `\n ` continuation pattern eats the indent off
blank-but-indented source lines, leaving a `\n` in the rewriter
buffer

Preformatted: strip leading/trailing blank-line padding from body

The lexer's `\n ` continuation pattern eats the indent off
blank-but-indented source lines, leaving a `\n` in the rewriter
buffer for each one. Trim those padding newlines before emitting
so the preformatted body starts and ends on a non-blank line, as
GFM example #87 requires. Whitespace-only blocks are still
skipped entirely.

Adds two PreformattedTest cases pinning the new behavior.

show more ...

451f284205-May-2026 Andreas Gohr <andi@splitbrain.org>

clean up markdown spec test skips

Ordered by example number, same format, single line.

Some skips now actually pass - removed. A couple others should pass but
don't yet - also removed. Code fix fol

clean up markdown spec test skips

Ordered by example number, same format, single line.

Some skips now actually pass - removed. A couple others should pass but
don't yet - also removed. Code fix follows.

show more ...

dccbd51405-May-2026 Andreas Gohr <andi@splitbrain.org>

GfmQuote: accept ^> line starts so quotes can follow tables and lists

GfmTable, DW Table, and DW Listblock all consume the boundary \n on
their way out. A pure-lookahead exit pattern at that boundar

GfmQuote: accept ^> line starts so quotes can follow tables and lists

GfmTable, DW Table, and DW Listblock all consume the boundary \n on
their way out. A pure-lookahead exit pattern at that boundary would
trip the lexer's no-advance safety check, because tables and lists
exit right after consuming a marker token and have no leading
unmatched content for the lookahead to attach to (unlike Preformatted,
whose body leaves code lines as UNMATCHED right before the boundary).

Fix this on the consumer side: change the first-line anchor from \n>
to (?:^|\n)>. With the lexer's m flag, ^ matches at offset 0 and at
any position immediately following a \n in the subject, including the
position right after a \n that a preceding mode just consumed.
Subsequent quote lines keep the \n> anchor.

Adds three handoff tests in GfmQuoteTest covering GfmTable, DW Table,
and DW Listblock. Resolves GFM spec example 201.

show more ...

198d33e805-May-2026 Andreas Gohr <andi@splitbrain.org>

GfmSpecTest: skip task list items extension (#279, #280)

GFM task list items (`- [ ] foo` / `- [x] foo`) are not implemented;
the literal marker stays as the first content of the list item.

506762f405-May-2026 Andreas Gohr <andi@splitbrain.org>

GfmSpecTest: skip indented-code §4.4 family and Disallowed Raw HTML #652

The 4-space indent trigger fires on paragraph-continuation lines and
exits on any blank line, both of which collide with Comm

GfmSpecTest: skip indented-code §4.4 family and Disallowed Raw HTML #652

The 4-space indent trigger fires on paragraph-continuation lines and
exits on any blank line, both of which collide with CommonMark §4.4 —
fixing either would require paragraph-open state the single-pass lexer
cannot carry. List-interior cases additionally need the column
arithmetic documented as out of scope for the §2.2 tabs family.

#652 (Disallowed Raw HTML) is a filter on top of raw HTML pass-through,
which DokuWiki escapes by policy (see #118-160), so it has no input.

show more ...

f9d3b7bd05-May-2026 Andreas Gohr <andi@splitbrain.org>

Externallink: add per-scheme angle-bracket autolinks for MD syntax

Adds CommonMark §6.5 <URL> autolinks to Externallink, gated to
md/md+dw/dw+md syntax via ModeRegistry::isMdPreferred(). Per-scheme

Externallink: add per-scheme angle-bracket autolinks for MD syntax

Adds CommonMark §6.5 <URL> autolinks to Externallink, gated to
md/md+dw/dw+md syntax via ModeRegistry::isMdPreferred(). Per-scheme
patterns share the existing conf/scheme.conf allow-list so unknown
schemes fall through to literal cdata instead of being silently
dropped by the renderer. Internal whitespace inside the brackets
disqualifies the autolink and the whole envelope is emitted as
cdata to keep the bare-URL detector off the URL.

LinksTest gains 5 cases covering success, internal-whitespace and
leading-whitespace disqualification, unregistered scheme fallthrough,
and the dw-only no-op path. SpecCompatRenderer URL encoder is updated
to match cmark-gfm's HREF_SAFE table (square brackets and a few other
characters move from safe to encoded). skip.php loses the obsolete
#356 entry and gains #605/#606/#607/#609 explaining the unregistered-
scheme cases that the per-scheme regex naturally rejects.

show more ...

c2248fda05-May-2026 Andreas Gohr <andi@splitbrain.org>

Block: collapse [ \t]*\n[ \t]* to \n inside paragraphs

Strip [ \t]+ on either side of the soft-break joiner emitted for a
single eol, and ltrim the first cdata of each paragraph. Without this,
DokuW

Block: collapse [ \t]*\n[ \t]* to \n inside paragraphs

Strip [ \t]+ on either side of the soft-break joiner emitted for a
single eol, and ltrim the first cdata of each paragraph. Without this,
DokuWiki preserved leading/trailing whitespace on continuation lines
verbatim, which is invisible in HTML but may visible in plain-text
and other renderers. It is also a requirement in the Markdown spec.

Re-baseline the parser-mode tests that pinned the old preserve
behavior (cdata adjacent to <code>/<file>/<rss>/header/footnote).

show more ...

123