Skip to content

Commit 3fd91e4

Browse files
authored
Merge pull request #5169 from myk002/myk_docfix
fix mysterious new errors in CI
2 parents 558dc3a + 4ef8644 commit 3fd91e4

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

docs/dev/Lua API.rst

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3155,15 +3155,14 @@ unless otherwise noted.
31553155

31563156
* ``dfhack.filesystem.listdir_recursive(path [, depth = 10[, include_prefix = true]])``
31573157

3158-
Lists all files/directories in a directory and its subdirectories. All directories
3159-
are listed before their contents. Returns a table with subtables of the format::
3158+
Lists all files/directories in a directory and its subdirectories. All
3159+
directories are listed before their contents. Returns a table with subtables
3160+
of the format: ``{path: 'path to file', isdir: true|false}``
31603161

3161-
{path: 'path to file', isdir: true|false}
3162-
3163-
Note that ``listdir()`` returns only the base name of each directory entry, while
3164-
``listdir_recursive()`` returns the initial path and all components following it
3165-
for each entry. Set ``include_prefix`` to false if you don't want the ``path``
3166-
string prepended to the returned filenames.
3162+
Note that ``listdir()`` returns only the base name of each directory entry,
3163+
while ``listdir_recursive()`` returns the initial path and all components
3164+
following it for each entry. Set ``include_prefix`` to false if you don't
3165+
want the ``path`` string prepended to the returned filenames.
31673166

31683167
Console API
31693168
-----------
@@ -3703,6 +3702,8 @@ functions. These are invoked just like standard string functions, e.g.::
37033702
script-manager
37043703
==============
37053704

3705+
.. highlight:: none
3706+
37063707
This module contains functions useful for mods that contain DFHack scripts to
37073708
retrieve source and state paths. The value to pass as ``mod_id`` must be the
37083709
same as the mod ID in the mod's :file:`info.txt` metadata file. The returned
@@ -3741,6 +3742,8 @@ paths will be relative to the top level game directory and will end in a slash
37413742
utils
37423743
=====
37433744

3745+
.. highlight:: lua
3746+
37443747
* ``utils.compare(a,b)``
37453748

37463749
Comparator function; returns *-1* if a<b, *1* if a>b, *0* otherwise.

docs/guides/modding-guide.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ immensely, and you can always ask for help in the `right places <support>`.
238238
Reading and writing files and other persistent state
239239
----------------------------------------------------
240240

241+
.. highlight:: none
242+
241243
There are several locations and APIs that a mod might need to read or store
242244
data:
243245

@@ -254,6 +256,8 @@ for reading and writing JSON data. For example::
254256
-- modify state in the config.data table and persist it when it changes with
255257
-- config:write()
256258

259+
.. highlight:: lua
260+
257261
State that should be saved with a world or a specific fort within that world
258262
should use `persistent-api` API. You can attach a state change hook for new
259263
world loaded where you can load the state, which often includes whether the mod

0 commit comments

Comments
 (0)