From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127893 invoked by alias); 13 Jun 2017 17:21:34 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 127879 invoked by uid 89); 13 Jun 2017 17:21:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Damien, damien, repl X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Jun 2017 17:21:32 +0000 Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1dKpVV-00038K-1J; Tue, 13 Jun 2017 19:21:33 +0200 Received: from 70-36-239-209.dsl.dynamic.fusionbroadband.com ([70.36.239.209] helo=localhost.localdomain) by mailfront12.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1dKpVJ-00077l-Mz; Tue, 13 Jun 2017 19:21:22 +0200 Subject: Re: xml literals To: Damien MATTEI , Kawa mailing list References: <201705151611.09622.Damien.Mattei@unice.fr> <201706091713.23504.Damien.Mattei@unice.fr> <6b50a1f5-f387-68f6-1530-60cdafcbbde6@bothner.com> <201706131115.05600.Damien.Mattei@unice.fr> From: Per Bothner Message-ID: <0a33179a-7dc9-e69c-b8be-a47219b051f0@bothner.com> Date: Tue, 13 Jun 2017 17:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <201706131115.05600.Damien.Mattei@unice.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q2/txt/msg00108.txt.bz2 On 06/13/2017 02:15 AM, Damien MATTEI wrote: > hello, > is there a way in HTML literal to make the code more human readable, > by inserting CR between two literals or /and to indent the code, ican not find a way in the doc > to insert characters between literals or doing it , if it's not possible i suppose it is not trivial to do it > as the method toString should be overwrite . It does not appear to be documented, but XML literals can include the same 'special-escape' forms used in String template literals and named literals: https://www.gnu.org/software/kawa/String-literals.html#meta-special-escape I.e. use &- to include a newline in the literal, but not the the HTML text. Use &| to add ignored initial indentation: (write #123&- &|456) => #123456 Note: There is a bug so you can't type (just) the following into the REPL: #123&- &|456 That should be an easy fix. -- --Per Bothner per@bothner.com http://per.bothner.com/