aboutsummaryrefslogtreecommitdiff
path: root/scripts/luacats_grammar.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-03-08 12:25:18 +0000
committerLewis Russell <me@lewisr.dev>2024-03-09 11:21:55 +0000
commitade1b12f49c3b3914c74847d791eb90ea90b56b7 (patch)
treeb76b5f4cbb3398c7c7081e33db0b8fba99600f6e /scripts/luacats_grammar.lua
parent0e284939143ae5bd55f78ece388346811af842ea (diff)
downloadrneovim-ade1b12f49c3b3914c74847d791eb90ea90b56b7.tar.gz
rneovim-ade1b12f49c3b3914c74847d791eb90ea90b56b7.tar.bz2
rneovim-ade1b12f49c3b3914c74847d791eb90ea90b56b7.zip
docs: support inline markdown
- Tags are now created with `[tag]()` - References are now created with `[tag]` - Code spans are no longer wrapped
Diffstat (limited to 'scripts/luacats_grammar.lua')
-rw-r--r--scripts/luacats_grammar.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/luacats_grammar.lua b/scripts/luacats_grammar.lua
index 158541dc77..ca26c70156 100644
--- a/scripts/luacats_grammar.lua
+++ b/scripts/luacats_grammar.lua
@@ -173,10 +173,10 @@ local grammar = P {
ty = v.ty_fun + ident + v.ty_table + literal + paren(v.ty),
ty_param = Pf('<') * comma1(v.ltype) * fill * P('>'),
ty_opt = v.ty * opt(v.ty_param) * opt(P('[]')) * opt(P('?')),
- ty_index = (Pf('[') * v.ltype * Pf(']')),
+ ty_index = (Pf('[') * (v.ltype + ident + rep1(num)) * fill * P(']')),
table_key = v.ty_index + lname,
table_elem = v.table_key * colon * v.ltype,
- ty_table = Pf('{') * comma1(v.table_elem) * Pf('}'),
+ ty_table = Pf('{') * comma1(v.table_elem) * fill * P('}'),
fun_param = lname * opt(colon * v.ltype),
ty_fun = Pf('fun') * paren(comma(lname * opt(colon * v.ltype))) * opt(colon * comma1(v.ltype)),
}