Skip to content

Commit 999b9cb

Browse files
committed
Show example module right in the documentation
1 parent 4d174d5 commit 999b9cb

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

docs/source/example.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,18 @@ This output is generated with the following directive:
3131
:module-member-order: groupwise
3232
```
3333
34-
See ``logging.lua`` `on github`_.
34+
.. tab-set::
35+
36+
.. tab-item:: Result
3537

36-
.. _on github: https://github.com/taminomara/sphinx-lua-ls/blob/main/docs/example/logging.lua
38+
.. lua:autoobject:: logging
39+
:members:
40+
:globals:
41+
:recursive:
42+
:index-table:
43+
:module-member-order: groupwise
3744

38-
----
45+
.. tab-item:: logging.lua
3946

40-
.. lua:autoobject:: logging
41-
:members:
42-
:globals:
43-
:recursive:
44-
:index-table:
45-
:module-member-order: groupwise
47+
.. literalinclude:: /example/logging.lua
48+
:language: lua

0 commit comments

Comments
 (0)