SlickEdit Community
Archived Beta Discussions => SlickEdit 202x Beta Discussions => SlickEdit 2020 v25 Beta Discussion => Topic started by: jporkkahtc on July 22, 2020, 05:29:33 PM
-
I don't see a language def for Jinja.
I have some *.Jinja macro files that are used it part of a code generator - so this macro code is stand alone, not embedded in anything
-
No Jinja as a stand alone language yet. Didn't know there was such a thing.
Can you post a sample .Jinja macros file?
How is a stand alone Jinja file used?
-
Your stand alone Jinja sample looks pretty much like embedded code. {% Jinja code ... %}. etc.
The only thing in your Jinja file which is out side of this are some double quoted strings:
"Array"{%...%}
Are quoted strings outside of {%...%} part of the Jinja language or just some arbitrary text? There's also a some commas outside of {%...%}. I'm guessing if it's outside of {%...%}, then it's not colored as Jinja.
-
"Array" appears verbatim (including quotes) in the output -- Jinja doesn't interpret the quotes.
outside of {% %}, double braces {{variable}} are substitutions.
From this: https://jinja.palletsprojects.com/en/2.11.x/templates/#synopsis
Anything outside of these
{% ... %} for Statements
{{ ... }} for Expressions to print to the template output
{# ... #} for Comments not included in the template output
# ... ## for Line Statements
is just plain text.
If I rename my file from "something.jina" to "something.cs" or "something.ps1"
should Slick recognize this is Jinja macros embedded in csharp or powershell script?
-
yes, renaming the files works - along with toggle_jinja_color_coding!
-
should Slick recognize this is Jinja macros embedded in csharp or powershell script?
I'm not sure I follow the question (is Jinja embedded in a different way?) Can you post small sample code?