<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in ParallelRegexTest.php</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2025</copyright>
    <generator>Java</generator><item>
        <title>864d6c6daac408fa4fc25801adcaf0f744288b30 - fix Lexer so exit-pattern lookbehinds see chars consumed by prior tokens</title>
        <link>http://127.0.0.1:8080/history/dokuwiki/_test/tests/Parsing/Lexer/ParallelRegexTest.php#864d6c6daac408fa4fc25801adcaf0f744288b30</link>
        <description>fix Lexer so exit-pattern lookbehinds see chars consumed by prior tokensLexer::reduce used to hand PCRE a shrinking tail of the subject &#8212; eachmatched token was chopped off the front of $raw and the next preg_matchran on what remained. Once a token was consumed, the bytes before thecursor were gone, and any lookbehind assertion in a subsequent patternsilently failed.The bug was latent for DokuWiki&apos;s entire history because literal exitpatterns like `\*\*`, `&lt;/file&gt;`, or `%%` don&apos;t care what&apos;s behind them.It surfaced with c3755410a (&quot;require non-whitespace adjacency forinline formatting delimiters&quot;), which added `(?&lt;=[^\s])` to Strong,Emphasis, Underline, Monospace, Subscript, Superscript and Deleted atonce. After that commit, `**[[link]]**` stopped closing &#8212; the `]` thatwould satisfy the lookbehind had just been consumed by the link match,so Strong stayed open until end-of-section and swallowed everythingafter it (list items, headings, the lot).Fix:* Lexer::parse and Lexer::reduce track a byte offset into $raw instead  of mutating $raw. $initialLength and the shrinking-length arithmetic  for absolute match positions are replaced by straight offset  increments; the no-progress guard and the trailing-unmatched dispatch  both shift to the same cursor.* ParallelRegex::split takes an optional $offset and passes it to  preg_match together with PREG_OFFSET_CAPTURE. PCRE scans from the  offset forward but still sees the whole subject, so lookbehinds work  across already-consumed tokens. The secondary preg_split call used  to carve out pre/post is no longer needed &#8212; PREG_OFFSET_CAPTURE  gives the match start for free, saving one regex operation per  reduce() step.Regression tests at all three layers:* ParallelRegexTest &#8212; offset plumbing and pre/match accounting.* LexerTest::testIndexLookbehindAcrossConsumedToken &#8212; exit-pattern  lookbehind targeting the `/&gt;` of a self-closing `&lt;a/&gt;` that was  consumed as a SPECIAL token on the previous step. Fails under the  old Lexer.* FormattingTest &#8212; `**[[link]]**` and `**foo//bar//**` round-trip  with correct open/close instructions through the full pipeline.Also updates ListsTest::testUnorderedListStrong, whose expectationsdocumented the pre-fix buggy behaviour (&quot;formatting able to spreadacross list items&quot;). With the fix, bold correctly stays within asingle list item; the expected call sequence and the comment areupdated to match.

            List of files:
            /dokuwiki/_test/tests/Parsing/Lexer/ParallelRegexTest.php</description>
        <pubDate>Tue, 21 Apr 2026 15:28:18 +0000</pubDate>
        <dc:creator>Andreas Gohr &lt;gohr@cosmocode.de&gt;</dc:creator>
    </item>
<item>
        <title>504c13e8df88563c11b3720b317991bc38835a35 - migrate parser tests to modern namespaced classes</title>
        <link>http://127.0.0.1:8080/history/dokuwiki/_test/tests/Parsing/Lexer/ParallelRegexTest.php#504c13e8df88563c11b3720b317991bc38835a35</link>
        <description>migrate parser tests to modern namespaced classesMove old-style parser tests from _test/tests/inc/parser/ to namespacedtest classes under _test/tests/Parsing/ParserMode/ and_test/tests/Parsing/Lexer/.- Add ParserTestBase with assertCalls() helper for comparing handler  call sequences with byte index stripping- Split lexer.test.php into ParallelRegexTest, StateStackTest, and  LexerTest with a RecordingHandler that extends Handler- Merge handler_parse_highlight_options tests into CodeTest- Add new tests for previously untested modes: Nocache, Notoc, Rss,  and all individual formatting modes (Strong, Emphasis, etc.)- Modernize test code: [] syntax, lowercase null, correct assertEquals  argument order, replace deprecated withConsecutive and string callables- Renderer tests remain in old location (renderers not yet migrated)

            List of files:
            /dokuwiki/_test/tests/Parsing/Lexer/ParallelRegexTest.php</description>
        <pubDate>Sat, 18 Apr 2026 18:21:39 +0000</pubDate>
        <dc:creator>Andreas Gohr &lt;andi@splitbrain.org&gt;</dc:creator>
    </item>
</channel>
</rss>
