Skip to content

Commit

Permalink
fix: FORMAT is a string (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanouil authored Jun 28, 2024
1 parent 37406af commit 2d1923c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _extensions/lua-env/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
title: lua-env
author: Mickaël Canouil
version: 1.0.1
version: 1.0.2
quarto-required: ">=1.4.459"
contributes:
shortcodes:
Expand Down
2 changes: 1 addition & 1 deletion _extensions/lua-env/lua-env-filter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function Meta(meta)
["quarto"] = get_values(quarto),
["pandoc"] = {
["PANDOC_STATE"] = get_values(PANDOC_STATE),
["FORMAT"] = get_values(FORMAT),
["FORMAT"] = tostring(FORMAT),
["PANDOC_READER_OPTIONS"] = get_values(PANDOC_READER_OPTIONS),
["PANDOC_WRITER_OPTIONS"] = get_values(PANDOC_WRITER_OPTIONS),
["PANDOC_VERSION"] = tostring(PANDOC_VERSION),
Expand Down
40 changes: 40 additions & 0 deletions example.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,68 @@ filters:

### Quarto

::: {.columns}

:::: {.column}

```markdown
{{{< lua-env quarto.doc.input_file >}}}
```

{{< lua-env quarto.doc.input_file >}}

::::
:::: {.column}

```markdown
{{{< meta lua-env.quarto.doc.input_file >}}}
```

{{< meta lua-env.quarto.doc.input_file >}}

::::
:::

### Pandoc

::: {.columns}
:::: {.column}

```markdown
{{{< lua-env pandoc.PANDOC_VERSION >}}}
```

{{< lua-env pandoc.PANDOC_VERSION >}}

::::
:::: {.column}

```markdown
{{{< meta lua-env.pandoc.PANDOC_VERSION >}}}
```

{{< meta lua-env.pandoc.PANDOC_VERSION >}}

::::
:::

::: {.columns}
:::: {.column}

```markdown
{{{< lua-env pandoc.FORMAT >}}}
```

{{< lua-env pandoc.FORMAT >}}

::::
:::: {.column}

```markdown
{{{< meta lua-env.pandoc.FORMAT >}}}
```

{{< meta lua-env.pandoc.FORMAT >}}

::::
:::

0 comments on commit 2d1923c

Please sign in to comment.