Bug 39715 removed quotes around DataTables options. We should enforce it with a test to prevent further occurrences.
Created attachment 189994 [details] [review] Bug 41324: Add a xt test Patch from commit a307855
Created attachment 189995 [details] [review] Bug 41324: Tidy some kohaTable blocks - examples Commit using --no-verify to ease rebase
Created attachment 189996 [details] [review] Bug 41324: Tidy modified files Commit the tidiness perl misc/devel/tidy.pl $(git diff --name-only HEAD~1)
Patches for discussion. One last thing that is not tidy is the script tags from the .tt files. If script tags have TT tags, the prettier plugin cannot tidy them. I was trying to provide a solution to prevent regressions for bug 39715. I think this is great, but it will introduce conflicts. I am happy to continue, but I first need to know if people want that. The idea is to use JS variables instead of TT variables, and have the assignment in a first script block. example: ``` <script> // This cannot be tidy [% IF foo %] # do something [% ELSE %] let foo = 42; [% END %] </script> ``` => ``` <script> // This still cannot be tidy let foo = [% foo ? 1 : 0 %]; </script> <script> // But now this will be tidy automatically! if ( foo ) { # do something } else { let foo = 42; } </script> ``` On this bug report I will mainly focus on kohaTable, but it may actually impact whole template file. See also bug 41323 for the "remaining ones".