M
M
M0OL0L2021-01-31 14:02:10
Arrays
M0OL0L, 2021-01-31 14:02:10

How to make Pug accept "multi-line" variables?

Hello to all!!! Pug complains if I write a variable (associative array) on multiple lines:

//cсылки для header.pug страницы video!!!
- var list_lnk_video = {
    Index :"index.html",
    Form :"form.html",
    Iframe :"iframe.html",
    Frameset :"frameset.html",
    Table :"table.html",
    Test :"test.html"};


If this list is arranged in one line, then everything completes without problems, but for a visual "audit" it is very inconvenient, and if we take into account that there will be 10 or more elements in the dictionary, then support for this variable will be at least not convenient. How do you get Pug to accept "multi-line" variables?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
M0OL0L, 2021-01-31
@M0OL0L

Thanks everyone, I found the answer: the
syntax needs to be changed a little and everything works:

//cсылки для header.pug страницы video!!!
-
  var list_lnk_video = {
    Index :"index.html",
    Form :"form.html",
    Iframe :"iframe.html",
    Frameset :"frameset.html",
    Table :"table.html",
    Test :"test.html"};

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question