patat icon indicating copy to clipboard operation
patat copied to clipboard

Code eval not working as expected.

Open gnarlsmarley opened this issue 3 years ago • 2 comments

test.md


patat: eval: figlet: command: figlet fragment: false replace: true ...

Fancy Font

Running this like..

$ patat test.md

Fancy Font 
           

I have figlet installed and tried other eval based examples in /patat/tests/golden/inputs with similar results. Eval block appears un-evaluated. Perhaps I am doing something very wrong? Am looking to eval simple commands such as 'ls', 'echo $USER', 'pwd' or other command substituted commands.

gnarlsmarley avatar Apr 05 '21 05:04 gnarlsmarley

Hmm, from the markdown you posted, it looks like things should work. For reference, I put the following into a file:

---
patat:
  eval:
    figlet:
      command: figlet
      fragment: false
      replace: true
...

```figlet
Fancy Font
```

And patat seems to work fine.

Maybe you are using an older version? You can check this by running patat --version. The eval feature was added fairly recently in 0.8.6.x.

jaspervdj avatar Apr 05 '21 09:04 jaspervdj

I have the same issue with 0.8.7.0 and pandoc 2.11.2, and the image rendering doesn't work either.

OS: macOS Architecture: arm64

cskksdfklpz avatar Jun 02 '21 20:06 cskksdfklpz