public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: Damien MATTEI <Damien.Mattei@unice.fr>,
	Kawa mailing list <kawa@sourceware.org>
Subject: Re: xml literals
Date: Tue, 13 Jun 2017 17:21:00 -0000	[thread overview]
Message-ID: <0a33179a-7dc9-e69c-b8be-a47219b051f0@bothner.com> (raw)
In-Reply-To: <201706131115.05600.Damien.Mattei@unice.fr>

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 #<abc>123&-
     &|456</>)

=> #<abc>123456</abc>

Note: There is a bug so you can't type (just) the following into the REPL:

#<abc>123&-
     &|456</>

That should be an easy fix.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

      parent reply	other threads:[~2017-06-13 17:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 14:11 Damien MATTEI
2017-05-15 16:06 ` Per Bothner
2017-05-15 16:50   ` Damien MATTEI
2017-05-15 16:57     ` Damien MATTEI
2017-05-15 18:51       ` Per Bothner
2017-05-22  9:26         ` Damien MATTEI
2017-05-22 10:14           ` Sudarshan S Chawathe
2017-05-22 13:44             ` Damien MATTEI
2017-05-22 13:55               ` Damien MATTEI
2017-05-22 15:44           ` Per Bothner
     [not found]             ` <CADEOadc_87ON2=Tsjd+Ca4d90GoeKABpR3vsrHiP=5SMTKPNZQ@mail.gmail.com>
2017-05-23 13:11               ` Fwd: " Damien Mattei
2017-05-23 19:36           ` Per Bothner
2017-06-06  9:26         ` Damien MATTEI
2017-06-07 14:17           ` Damien MATTEI
2017-06-07 14:36             ` Damien MATTEI
2017-06-07 16:24             ` Per Bothner
2017-06-07 18:16               ` Per Bothner
2017-06-09 15:13                 ` Damien MATTEI
2017-06-09 18:17                   ` Per Bothner
2017-06-10 17:22                     ` Per Bothner
2017-06-13  9:15                     ` Damien MATTEI
2017-06-13  9:37                       ` Damien MATTEI
2017-06-13 17:21                       ` Per Bothner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0a33179a-7dc9-e69c-b8be-a47219b051f0@bothner.com \
    --to=per@bothner.com \
    --cc=Damien.Mattei@unice.fr \
    --cc=kawa@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).