Closed codergoblin closed 1 week ago
Yes, it happend to me too, It happend if the name of the link have some image extension on it, as tif gif tiff bmp .... I solved changing regexpression of line 152 of perlite/content.php as follow: $pattern = array('/(!?[[)(.*?)(.png|.jpg|.jpeg|.svg|.gif|.bmp|.tif|.tiff)|?(.+|)(]])/'); (it's noted under //img link with captions replace block ) and restart server: systemctl restart php8.3-fpm nginx
by the way i add a block for embed m4a links, adding this lines between embedded blocks:
// embedded m4a links
$replaces = '
<video controls src="' . $path . '/\\2" type="audio/x-m4a">
<a class="internal-link" target="_blank" rel="noopener noreferrer" href="' . $path . '/' . '\\2">Your browser does not support the video tag: Download \\2</a>
</video>';
$pattern = array('/(\!\[\[)(.*?.(?:m4a))(\]\])/');
$content = preg_replace($pattern, $replaces, $content);
thx, I hope in a future propose changes through pull requests.
of course, Im always open to PRs! thanks for your contribution!
I have many instances in my wiki where links break the page in a strange way.
it looks like in this case
[[Triya]]
breaks the link, but not sure why, it does not seem to be any different to other links that function correctly. It happens in different pages with different links but I can't see any pattern.