Skip to content

Conversation

@ssahara
Copy link
Contributor

@ssahara ssahara commented Nov 2, 2020

This PR will make the EditTable plugin compatible with DokuWiki snapshot 2020-10-13 or later that #3198 merged. The edit form has now build using new dokuwiki\Form\Form class instead of deprecated Doku_Form. We need new event EDIT_FORM_ADDTEXTAREA handler to modify the edit form.

This PR will also fix issues of deprecated JSON()->decode() methods and utf8_strlen().

@annda
Copy link
Contributor

annda commented Nov 7, 2020

LGTM. However, the change in 3f61cb4 breaks compatibility with DokuWiki versions prior to Hogfather.

@ssahara could you add a check for the existence of the newUtf8\phpString class?

strWidth($str) returns the width of string str, where halfwidth characters count as 1, and fullwidth characters count as 2.
@ssahara
Copy link
Contributor Author

ssahara commented Nov 9, 2020

@annda thanks for the comment. I have added availability check of Utf8\PhpString class in new strWidth() method.
Japanese users will often use kanji and hiragana (漢字かな) as well as alphabet, it is nice to count those fullwidth zenkaku letters as 2 to get tidy table source text.

@annda annda merged commit 6eb2267 into cosmocode:master Nov 9, 2020
@ssahara ssahara deleted the form branch November 10, 2020 03:53
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