Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 44F1318B25 for ; Mon, 24 Aug 2015 15:53:54 +0000 (UTC) Received: (qmail 36114 invoked by uid 500); 24 Aug 2015 15:53:47 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 36024 invoked by uid 500); 24 Aug 2015 15:53:47 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 35941 invoked by uid 99); 24 Aug 2015 15:53:47 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Aug 2015 15:53:47 +0000 Date: Mon, 24 Aug 2015 15:53:47 +0000 (UTC) From: "Henri Biestro (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (JEXL-177) Unified expressions to be used in String literals in Jexl scripts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JEXL-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14709498#comment-14709498 ] Henri Biestro commented on JEXL-177: ------------------------------------ Documentation might be confusing and it may not fit your style but you could use something like: {code} $$ if (item != null) { ${item} $$ } {code} In templates (vs expressions), lines that begin with '$$' allow writing script fragments and you get access to the full syntax (var, functions, etc). Other lines are interpolated. > Unified expressions to be used in String literals in Jexl scripts > ----------------------------------------------------------------- > > Key: JEXL-177 > URL: https://issues.apache.org/jira/browse/JEXL-177 > Project: Commons JEXL > Issue Type: New Feature > Affects Versions: 3.0 > Reporter: Dmitri Blinov > Priority: Minor > > Introduce new string literals to jexl script that allow unified expressions to be used, string literals could use for example triple quoted (single or double) syntax for delimiters, may include newlines and should not escape single quotes > {code} > user = "Bob"; server = "Test"; s = """Hello ${user}, welcome to ${server}"""; return s; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)