From 17915d93bfb50aaff6c4bf77fe25707705e557c8 Mon Sep 17 00:00:00 2001 From: Jake Leahy Date: Mon, 17 Jul 2023 03:46:18 +1000 Subject: Fix non-toplevel fields in objects not getting rendered (#22266) * Add example object into testproject The proc is there to check the case of an identDef being inside an identDef (We do want to render those even if they are not exported) * Add `inside` set to `TSrcGen` which allows us to see what context we are in This is done instead of adding another inXyz bool parameter We then use this to know if we are inside an object when rendering an nkIdentDefs (To know if we need to skip rendering it) * Update test files --- nimdoc/testproject/expected/testproject.html | 23 ++++++++++++++++++++++- nimdoc/testproject/expected/testproject.idx | 1 + nimdoc/testproject/expected/theindex.html | 4 ++++ nimdoc/testproject/testproject.nim | 8 ++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) (limited to 'nimdoc/testproject') diff --git a/nimdoc/testproject/expected/testproject.html b/nimdoc/testproject/expected/testproject.html index a5c9b6af2..78a730e59 100644 --- a/nimdoc/testproject/expected/testproject.html +++ b/nimdoc/testproject/expected/testproject.html @@ -56,6 +56,12 @@ +
AnotherObject:
anything: