public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Is this a bug?
@ 2021-03-28  8:00 Bücherregal Domi
       [not found] ` <e2b36f5d-7c73-4160-a2d1-20b57c49f129n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Bücherregal Domi @ 2021-03-28  8:00 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1289 bytes --]


Good day, I'm fairly new to Pandoc, so I'm not sure if this is a bug or 
expected behavior. 

Executing, `echo "**line1**" | pandoc -t native`

Outputs: `[Para [Strong [Str "line1"]]]`

So far so good. Now, with the following lua filter stored in a file called 
`lua1.lua`

```lua
function Strong(elem)
  return pandoc.Str(elem.content)
end
```

Executing `echo "**line1**" | pandoc -t native --lua-filter lua1.lua`

Outputs: `[Para []]`

Which means a blank document, because the content "line1" was deleted, it 
doesn't exist anymore, is this a bug? Compare with the following.

Modifying the file `lua1.lua` as,

```lua
function Strong(elem)
  return pandoc.Str("hello1")
end
```

Executing again `echo "**line1**" | pandoc -t native --lua-filter lua1.lua`

Outputs: `[Para [Str "hello1"]]`

This one works, why does the first one not work? Shouldn't both work? Thank 
you.

-- 
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/e2b36f5d-7c73-4160-a2d1-20b57c49f129n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1953 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-03-29 15:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-28  8:00 Is this a bug? Bücherregal Domi
     [not found] ` <e2b36f5d-7c73-4160-a2d1-20b57c49f129n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-03-28  8:28   ` BPJ
     [not found]     ` <CADAJKhC0cK8iWsrohbSFaOe5POWU1QqSwpGCTpm3VNjEpgaZ8w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-03-28 10:10       ` Albert Krewinkel
     [not found]         ` <875z1bfv12.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2021-03-28 16:24           ` Bücherregal Domi
     [not found]             ` <33f13d23-8708-439a-a322-245821a5e900n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-03-28 18:24               ` Albert Krewinkel
     [not found]                 ` <87zgyndtmm.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2021-03-29  8:06                   ` BPJ
     [not found]                     ` <CADAJKhBVVX_KfL0DyuPq7+YUQRR1SK7MuOqi+giqp4ANbGLOkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-03-29 15:15                       ` Albert Krewinkel
     [not found]                         ` <87k0pqrnxx.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2021-03-29 15:34                           ` Albert Krewinkel

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).