Skip to content

Commit d89a356

Browse files
committed
lua,meta - resolve int keys as ints
1 parent 746aae0 commit d89a356

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/resources/filters/quarto-pre/options.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ end
4040

4141
function parseOption(name, options, def)
4242
local keys = split(name, ".")
43+
quarto.log.output(keys)
4344
local value = nil
4445
for i, key in ipairs(keys) do
4546
if value == nil then
4647
value = readOption(options, key, nil)
4748
else
49+
key = tonumber(key) or key
4850
value = value[key]
4951
end
5052

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: issue-8086
3+
testkey:
4+
- "value 1"
5+
- "value 2"
6+
testkey2:
7+
testkey: testvalue
8+
_quarto:
9+
tests:
10+
html:
11+
ensureFileRegexMatches:
12+
-
13+
- "testvalue"
14+
- "value 1"
15+
---
16+
17+
{{< meta testkey.1 >}}
18+
19+
{{< meta testkey2.testkey >}}

0 commit comments

Comments
 (0)