On input of long escaped property value in LESS, how to split it to a newline -


After

Suppose I have a long escaped property value In order to lower the input I can get it to produce a new row like @nl for output with new-lines in the final formatted CSS : `` \ n "` ; and use the property values ​​in my saved string output new lines:

  @nl: `" \ n "`; .test {property: ~ "one, @ {nl} two"; }  

It will output:

  .test {property: one, two; }  

The question is whether input with something new lines, something like this:

  .test {property: ~ "One, two"; }  

This throws a parse error: unrecognized input in low A long set of property values ​​may start with someone, starting with new lines, and being able to code it will benefit.

Although I posted the answer to my own question which I found was working, if it is present then I am open to a simple one.

Good, one solution I found that each row escaped its own Put it in string So it seems to work quite well for both input and output (depending on what tab settings is):

Input low

 < Code> @nl: `'\ n \ t \ t \ t" `; .test {property: ~" @ {nl} "~" one, @ {nl} "~" "two"; }  

Output CSS

  .test {property: one, two; }  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -