You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mojolicious uses a format called Embedded Perl for templating, as I recall it's pretty similar to Ruby on Rails' Embedded Ruby in terms of how they both delineate which bits are code and which are HTML/etc. When doing templating with HTML, the extension .html.ep will be used.
Here's a bit from the Mojolicious documentation:
Mojolicious includes a minimalistic but very powerful template system out of the box called Embedded Perl or ep for short. It is based on Mojo::Template and allows the embedding of Perl code right into actual content using a small set of special tags and line start characters. For all templates strict, warnings, utf8 and Perl 5.16 features are automatically enabled.
<% Perl code %>
<%= Perl expression, replaced with XML escaped result %>
<%== Perl expression, replaced with result %>
<%# Comment, useful for debugging %>
<%% Replaced with "<%", useful for generating templates %>
% Perl code line, treated as "<% line =%>" (explained later)
%= Perl expression line, treated as "<%= line %>"
%== Perl expression line, treated as "<%== line %>"
%# Comment line, useful for debugging
%% Replaced with "%", useful for generating templates
Theoretically EP can be used when doing templating with things other than HTML, but those are not relevant where Mojolicious is concerned and I've also not even seen that myself anywhere — just figured it might be worth a mention just in case?
Is there an existing issue for this?
What is the missing lexer?
Mojolicious uses a format called Embedded Perl for templating, as I recall it's pretty similar to Ruby on Rails' Embedded Ruby in terms of how they both delineate which bits are code and which are HTML/etc. When doing templating with HTML, the extension
.html.ep
will be used.Here's a bit from the Mojolicious documentation:
https://docs.mojolicious.org/Mojolicious/Guides/Rendering#Embedded-Perl
Theoretically EP can be used when doing templating with things other than HTML, but those are not relevant where Mojolicious is concerned and I've also not even seen that myself anywhere — just figured it might be worth a mention just in case?
Links to existing syntax definitions
The text was updated successfully, but these errors were encountered: