Skip to content

Commit 7722089

Browse files
authored
[BUGFIX] Remove Interlink handling for files for now (#899)
It causes bugs and needs special handling
1 parent d0c00ac commit 7722089

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

packages/typo3-docs-theme/src/TextRoles/FileTextRole.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ public function getAliases(): array
2020

2121
protected function createNode(DocumentParserContext $documentParserContext, string $referenceTarget, string|null $referenceName, string $role): AbstractLinkInlineNode
2222
{
23-
if (preg_match(self::INTERLINK_NAME_REGEX, $referenceTarget, $matches) && $matches[1] !== 'EXT') {
24-
return $this->createNodeWithInterlink($documentParserContext, $matches[2], $matches[1], $referenceName);
25-
}
2623
return $this->createNodeWithInterlink($documentParserContext, $referenceTarget, '', $referenceName);
2724
}
2825

tests/Integration/tests/typo3-file/expected/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ <h2>Linking files<a class="headerlink" href="#linking-files" data-bs-toggle="mod
367367
data-shortdescription=""
368368
><code class="code-inline file" translate="no">Configuration File</code><i class="fa-regular fa-circle-question"></i></a></li>
369369
<li><code class="code-inline file" translate="no" title="File path">Unknown/<wbr>File.<wbr>xyz</code></li>
370+
<li><code class="code-inline file" translate="no" title="File path">FILE:<wbr>EXT:<wbr>Unknown/<wbr>File.<wbr>xyz</code></li>
370371
</ul>
371372

372373
</section>

tests/Integration/tests/typo3-file/input/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Linking files
7272
* :file:`EXT:my_extension/Classes/SomeClass.php`
7373
* :file:`Configuration File <Configuration/Sets/MySet/config.yaml>`
7474
* :file:`Unknown/File.xyz`
75+
* :file:`FILE:EXT:Unknown/File.xyz`
7576

7677
Code Block captions
7778
===================

0 commit comments

Comments
 (0)