Closed alexjurkiewicz closed 8 years ago
/cc @saqibnaveed
So here are the docs on EPP syntax: https://docs.puppet.com/puppet/4.5/reference/lang_template_epp.html
tl;dr, within the following tags may be puppet code:
<%= EXPRESSION %>
, <% EXPRESSION %>
-- Puppet expression<% | PARAMETERS | %>
-- Puppet parameter list<%# COMMENT %>
-- commentTemplates are generally configuration files for other programs, so highlighting things outside these tags (or highlighting the tags incorrectly) get confusing fast. Here's an example from the above docs link using Puppet syntax highlighting (the current behaviour):
And here it is using ERB syntax:
EPP contains several incompatibilities from ERB, but it's 90% overlap and there are no egregious mis-highlights (unlike Puppet syntax, which will spuriously highlight $variable
outside EPP tags.
Long term I'd like an EPP syntax, but until then I'd rather ERB highlighting to plain text to Puppet highlighting.
Agreed. Thanks @alexjurkiewicz.
thanks for your help!
The ERB grammar is fine to be used for EPP, but I'm not sure how to create an 'EPP' grammar that simply inherits from ERB. At least plain text syntax is better than incorrect language.