About this project
Formats Mojolicious HTML templates by processing HTML and embedded Perl separately. The HTML structure is handled by Prettier's built-in HTML formatter. Embedded Perl in <% %>, <%= %>, <%== %> tags and % control lines is reformatted using perltidy when installed; otherwise, Perl remains unchanged. The plugin understands Mojolicious block syntax for proper indentation, collapses consecutive blank lines, and normalizes void HTML elements. It uses Prettier's standard options (printWidth, tabWidth, etc.) for consistent layout and respects .perltidyrc for Perl style. Requires perltidy and Mojolicious for Perl reformatting. Idempotent: formatting an already formatted file produces no changes. Note: conflicts with @awmottaz/prettier-plugin-void-html; use overrides to scope plugins to specific file patterns.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.