INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Expression Language Question - String Literals?  (Read 671 times)

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Expression Language Question - String Literals?
« on: September 09, 2019, 11:03:17 pm »

I was thinking about something and I don't know if it has been implemented and I missed it. Do we have string literals? In other words, if you want to put a bunch of text in an expression that would otherwise need to be individually escaped, do we have something like
//* freeform text *//

That lets us avoid having to escape each individual special character or whitespace in some chunk of text?

If not, that would be cool. It would make expressions more readable in many cases, especially for anything that touches a URL.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41926
  • Shoes gone again!
Re: Expression Language Question - String Literals?
« Reply #1 on: September 10, 2019, 08:20:52 am »

It's a good idea!

Next build we'll try this:
NEW: String literals can be defined in expressions by using /* comment here /*.  The text will be output without any formatting.
Logged
Matt Ashland, JRiver Media Center

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Expression Language Question - String Literals?
« Reply #2 on: September 10, 2019, 10:15:53 am »

Nice!
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41926
  • Shoes gone again!
Re: Expression Language Question - String Literals?
« Reply #3 on: September 17, 2019, 09:39:05 am »

This is in the latest build.
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up