@BP I am still working on that other filter which should read path from metadata blocks; well, that one will take lot longer than this :)

If you are aware of LaTeX's `glossaries` package, final goal is to provide similar functions to `pandoc` ...

Dne středa 30. září 2020 v 16:46:36 UTC+2 uživatel krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org napsal:
Thank you @BP , your solution works great too.
Now I can even choose from two correct </nbsp> representations ... !

Dne středa 30. září 2020 v 16:42:02 UTC+2 uživatel krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org napsal:
Thank you very much, now everything works perfectly!
I have to learn about Unicode and UTF-8 representations, since my main language (czech) uses them pretty heavily.

I try to test and clean up the code a little (add more checks in `myCheckString` and do some renaming) and try to provide solution for some funny situations (test file kinda shows that:

source:

```
a\ i test
```

compiles to native

[Para [Str "a\160i",Space,Str "test"]

But the correct solution should be

[Para [Str "a\160i",Str "\160",Str "test"]

I try to fix that.)

However, since you have helped me a lot in creating this filter, and since I would take that as a "filter-quality assurence," I would like to offer this filter to be inluded in pandoc-lua-filters repository.
Would it be ok?

Regards, Tomas

Dne středa 30. září 2020 v 16:30:05 UTC+2 uživatel Albert Krewinkel napsal:
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e83f7a58-5718-4858-b536-e7b95de540a9n%40googlegroups.com.