public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Lua filter to insert non-breable spaces
Date: Wed, 30 Sep 2020 16:41:22 +0200	[thread overview]
Message-ID: <CADAJKhDgxv6fYrNrxog5ZkJdai16SpFnJiOFZ8RtLhReQDoghA@mail.gmail.com> (raw)
In-Reply-To: <87imbvjq1p.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2123 bytes --]

In Lua 5.3 you *can* embed arbitrary UTF-8 characters in strings quite
easily: "\u{a0}" will give you a string containing the no break space.


-- 
Better --help|less than helpless

Den ons 30 sep. 2020 16:30Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
skrev:

> Good to hear that things are (mostly) working!
>
> krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org writes:
>
> > Turn out, that I dont know how to change one element type to another. If
> I
> > use this filter, I get in `native pandoc` something like:
> >
> > [Para [Str "a\160i",Space,Str "test"]
> > ,Para [Str "a",Str "\65533",Str "i",Str "\65533",Str "test"]]
> >
> > I have tryed few escapings, or set the type and content separately like:
> >
> > inlines[i].t = 'Str'
> > inlines[i].c = '\160'
> >
> > but to no avail (no change in the native output).
> > I would like to ask you one more time for guidance (well, hopefully,
> > afterwards I give myself a little break from lua).
>
> Right, I had missed that. Lua doesn't understand Haskell's syntax for
> (Unicode) characters. We have to either use a literal nbsp character
> ' ' or give the byte-wise UTF-8 representation of that char: '\xc2\xa0'
>
> Cheers!
>
>
> --
> Albert Krewinkel
> GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124
>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/87imbvjq1p.fsf%40zeitkraut.de
> .
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhDgxv6fYrNrxog5ZkJdai16SpFnJiOFZ8RtLhReQDoghA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 3405 bytes --]

  parent reply	other threads:[~2020-09-30 14:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 12:40 krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found] ` <62329746-0b8e-41f1-93d9-042398687631n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-09-30 13:32   ` Albert Krewinkel
     [not found]     ` <87k0wbjsov.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2020-09-30 14:10       ` krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]         ` <3d7b4797-4d83-44fd-a65c-d612ab07a6dfn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-09-30 14:29           ` Albert Krewinkel
     [not found]             ` <87imbvjq1p.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2020-09-30 14:41               ` BPJ [this message]
     [not found]                 ` <CADAJKhDgxv6fYrNrxog5ZkJdai16SpFnJiOFZ8RtLhReQDoghA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-09-30 14:44                   ` Albert Krewinkel
2020-09-30 14:42               ` krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]                 ` <2e4fe1e0-39ce-438f-b2ec-fc57fd72cad0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-09-30 14:46                   ` krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]                     ` <25ebada0-19c5-4ec4-a282-274308ee6b74n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-09-30 14:49                       ` krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]                         ` <e83f7a58-5718-4858-b536-e7b95de540a9n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-09-30 15:09                           ` BPJ
     [not found]                             ` <CADAJKhDh2zaKmuRKQYXRrf7MNOHrp-LkEEx2qoeV=oYPKb_Dzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-09-30 15:13                               ` krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

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=CADAJKhDgxv6fYrNrxog5ZkJdai16SpFnJiOFZ8RtLhReQDoghA@mail.gmail.com \
    --to=melroch-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.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 NNTP newsgroup(s).