Skip to content

Update syntax.php#14

Open
dunron wants to merge 2 commits intocosmocode:masterfrom
dunron:patch-2
Open

Update syntax.php#14
dunron wants to merge 2 commits intocosmocode:masterfrom
dunron:patch-2

Conversation

@dunron
Copy link
Copy Markdown
Contributor

@dunron dunron commented Sep 13, 2022

A few quick fixes to make the explain plugin work with the newest Dokuwiki ("Igor").

A few quick fixes to make the explain plugin work with the newest Dokuwiki ("Igor").
Comment thread syntax.php Outdated
foreach (array_keys($this->map) as $rxmatch) {
if ($match === $rxmatch ||
($this->map[$rxmatch]['i'] && utf8_strtolower($match) === $rxmatch)) {
($this->map[$rxmatch]['i'] && strtolower($match) === $rxmatch)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks UTF-8 compatibility

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Would you settle for mb_strtolower then? Not perfect either but it will handle most of UTF-8.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. please use the appropriate UTF-8 class provided with DokuWiki

Implemented __construct as suggested by jorbig, used Dokuwiki UTF-8 class, improved internal link handling and prevented undefined array warnings in render function.

Tested with 2025-05-14a "Librarian" and PHP 8.3.23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants