fix: anchor Divi name/id patterns at string end, number-advanced stays unknown, doc wording

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-26 13:16:20 +02:00
co-authored by Claude Opus 5.5
parent 4356e69bb9
commit c24b91d8a5
8 changed files with 13 additions and 8 deletions
@@ -19,6 +19,7 @@ final class BlockTest extends TestCase
return [
'no namespace' => ['button'],
'trailing markup injection' => ['divi/x --><script>'],
'trailing newline' => ["divi/x\n"],
'uppercase' => ['Divi/Button'],
'empty' => [''],
];
@@ -42,6 +42,7 @@ final class NodeIndexTest extends TestCase
);
self::assertSame(1, preg_match(NodeIndex::ID_PATTERN, 's1.g2'));
self::assertSame(0, preg_match(NodeIndex::ID_PATTERN, 's1..g2'));
self::assertSame(0, preg_match(NodeIndex::ID_PATTERN, "s1\n"));
}
public function testDocumentWithoutPlaceholderIsItsOwnRoot(): void