https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39522 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189540|0 |1 is obsolete| | --- Comment #29 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 189548 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189548&action=edit Bug 39522: Ignore the whole file for 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. Which means we actually cannot parse correctly formatted HTML files. 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) Signed-off-by: Catherine Small <c.small@rcs.ac.uk> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.