https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39522 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184034|0 |1 is obsolete| | --- Comment #17 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 184071 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184071&action=edit Bug 39522: Ignore closing html tag to correctly tidy The prettier plugin for TT has been adjusted to correctly parse our TT files: most of them does not have an opening head but have a closing head, then have an opening body but no closing body. To avoid the parser to fail we are commenting those lines in a pre-process step in the plugin, then uncomment them in the tidy script. https://gitlab.com/koha-community/prettier-plugin-template-toolkit/-/blob/ma... export const preprocess: Parser<Node>["preprocess"] = (text) => { return text .replace("</head>", "<!--</head>-->") .replace(/<body(.*)/, "<!--<body$1-->") .replace("</body>", "<!--</body>-->"); }; https://git.koha-community.org/Koha-community/Koha/src/branch/main/misc/deve... # Revert the substitutions done by the prettier plugin my $content = read_file($file); $content =~ s#<!--</head>-->#</head>#g; $content =~ s#<!--<body(.*)-->#<body$1#g; $content =~ s#<!--</body>-->#</body>#g; (yes it's a bit messy, but our templates are messy) -- You are receiving this mail because: You are watching all bug changes.