Giter Club home page Giter Club logo

panda's Issues

error when reading boolean metadata

I'm getting an error whenever I have a boolean value in my metadata, for example link-citations: true

I believe the error is coming from the read_vars_in_meta function, when it tries to unpack the table.

Conditionals only work when in separate paragraphs.

This works:

::: {.if myTest=test}
Using the syntax from test.md, this should appear because myTest is set to "test".
:::

It renders as:

Using the syntax from test.md, this should appear because myTest is set to “test”.

...but, this does not - it renders the block as plain text:

Here is some text and...
::: {.if myFlag=true}
This should appear because myFlag is set to true.
:::
Oh, and more text.

It renders as:

Here is some text and. . . ::: {.if myFlag=true} This should appear because myFlag is set to true. ::: Oh, and more text.

This greatly diminishes the utility of conditionals.

current file as environmental variable

Thanks for this project! I'm currently evaluating whether I can replace pp with panda or if I still need a preprocessor like upp.

Is there a way to access the name of the current file from panda? For example, with pp I used the macro !exec(date -r !file "+%Y-%m-%d") to set the metadata date to the date of the file's last modification.

`cmd` allow to specify file extension

For some absurd/historical reason the F# interactive console for scripts requires the name of the script files to end the extension .fsx. That means that something that should work perfectly well like this:

```{.fsx cmd="dotnet fsi" }
open System
Console.WriteLine("Hello from F#!")
```

Simply doesn't work. Instead I get the following error:

"~/Documents/Wiki/src/wasabi/wasabito_compact_filters.md" 50L, 729B written
^@^@error FS0226: The file extension of '/tmp/panda_script-57a468d967123abc/script.dotnet' is not r
ecognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli.^@^@Error runni
ng filter /home/lontivero/.local/bin/panda.lua:^@PandocLuaError "/home/lontivero/.local/bin/panda.l
ua:434: script error"^@stack traceback:^@^I/home/lontivero/.local/bin/panda.lua:422: in upvalue 'ru
n_script'^@^I/home/lontivero/.local/bin/panda.lua:446: in function </home/lontivero/.local/bin/pand
a.lua:440>^@
Press ENTER or type command to continue

I don't see any obvious way to make panda to save the script with a given extension.


Just to prove the problem is the script file extension, if I hardcode th extension .fsx in the run_script function as follow:

image

It works:

image

Add 'caption="string"' and header=true/false options to include block

When included file is a table, the caption must be a part of the included file or else the caption is not recognized. For example if table.md contains:

Col A|ColB
-----|-----
1|2

...and the following is specified in the main file:

:::{include table.md}
:::

Table: This is my Table

The caption will not render as a table caption. For that to work, table.md must contain the following:

Col A|ColB
-----|-----
1|2

Table: This is my Table

With the main file specifying only:

:::{include table.md}
:::

The problem with this is that if one is attempting to convert a pipe-delimited text file from Excel or some other input source,
neither the header separator (i.e. "-----|-----") nor the Table caption will be applied. So it would be extremely useful if one could
use a table.md file which looked like this:

Col A|ColB
1|2

...and state in the main file:

:::{include table.md caption="This is my Table" header=true}
:::

So that the result would render as:

Col A ColB
1 2

Table: This is my Table

Variables don't expand unless delimited by spaces

Variable expansion does not work if there are punctuation characters immediately to either side of the {{variable}} reference. This makes it impossible to use {{variables}} at the end of sentence, for example. See attachment below.

Also, conditional syntax as described in the rendered documentation does not match actual conditional syntax appearing in test.md in the repo.

bugs.md

gnuplot diagrams are not rendered

While graphviz diagrams work well, gnuplot doesn't. I've tried with all possible ideas but nothing seems to work. This example is taken from the doc (with img and out modified). I have gnuplot installed

```{render="gnuplot -e 'set terminal svg' -e 'set output "%o.svg"' -c %i"
     img="../../src/images/panda_gnuplot_example"
     out="/home/lontivero/Documents/Wiki/src/images" }
set xrange [-pi:pi]
set yrange [-1.5:1.5]
plot sin(x) lw 4, cos(x) lw 4
```

This is the result (pandoc rendered html output):
image

I don't know how to debug nor how to get more info to help understand what can be going wrong. Any idea?

Highlight code block

It is sometimes useful to highlight a line or section of code inside a code block in order to bring attention to it. Is this something that panda would consider implementing?

For example

```{highlight=2-3}
line1
line2
line3
```

might result in lines 2 and 3 being hilighted

Variable expansion doesn't work on `include`

I'm using panda as part of my wiki site generator and i need the paths to be relative to the wiki root directory. I wanted to solve it by doing:

```meta
wroot = "/home/user/Documents/Wiki/src/wasabi"
```

:::{include={{wroot}}/radical_ideas.md}}
whatever
:::

But it doesn't include the file. Instead it results in:

image

However, if I hardcode the file path it works like charm.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.