Advanced Citation KRL

There are two ways to do extended quoting in KRL. One of them is documented in Literals in Kynetx Docs. It looks like this:

var = << Some text >>; 

This syntax allows you to insert text into the text (for example, #{var} ).

However, I also saw another syntax used instead of <| ... |> <| ... |> . What is the difference between these two types of advanced citation mechanisms? What are the limitations / benefits of each?

+4
source share
1 answer

<<→ extended quotes are used for text and html.

<| | > extended quotes are used for javascript. Using these quotes when emitting javascript allows the engine to process it as javascript, which not only parses faster, but also has different processing for newlines.

emit should always be used with <| |. >

Fun fact: We call these clowners. :)

+4
source

Source: https://habr.com/ru/post/1342920/


All Articles