From c2280356cbfcb402e19fad6832f687a1c06432d8 Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 9 Oct 2020 01:15:42 -0400 Subject: [PATCH] Set language of some code blocks to enable syntax highlighting --- docs/Binpatches.rst | 4 +++- docs/Compile.rst | 6 +++++- docs/Core.rst | 12 +++++++++--- docs/Documentation.rst | 8 +++++++- docs/Lua API.rst | 2 ++ docs/Memory-research.rst | 4 +++- docs/Plugins.rst | 4 +++- library/xml | 2 +- scripts | 2 +- 9 files changed, 34 insertions(+), 10 deletions(-) diff --git a/docs/Binpatches.rst b/docs/Binpatches.rst index b92190bc8..8af50fa45 100644 --- a/docs/Binpatches.rst +++ b/docs/Binpatches.rst @@ -80,7 +80,9 @@ system console: If you use a permanent patch under OSX or Linux, you must update ``symbols.xml`` with the new checksum of the executable. Find the relevant -section, and add a new line:: +section, and add a new line: + +.. code-block:: xml diff --git a/docs/Compile.rst b/docs/Compile.rst index c98cb939a..5292f758d 100644 --- a/docs/Compile.rst +++ b/docs/Compile.rst @@ -1,3 +1,5 @@ +.. highlight:: shell + .. _compile: ################ @@ -283,7 +285,9 @@ Dwarf Fortress runs, it uses a libstdc++ shipped in the ``libs`` folder, which comes from GCC 4.8 and is incompatible with code compiled with newer GCC versions. As of DFHack 0.42.05-alpha1, the ``dfhack`` launcher script attempts to fix this by automatically removing the DF-provided libstdc++ on startup. -In rare cases, this may fail and cause errors such as:: +In rare cases, this may fail and cause errors such as: + +.. code-block:: text ./libs/Dwarf_Fortress: /pathToDF/libs/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by ./hack/libdfhack.so) diff --git a/docs/Core.rst b/docs/Core.rst index 5ef3e6a4d..0f83b8c5a 100644 --- a/docs/Core.rst +++ b/docs/Core.rst @@ -63,7 +63,9 @@ or at any other time using the ``dfhack-run`` executable. If DF/DFHack is started with arguments beginning with ``+``, the remaining text is treated as a command in the DFHack console. It is possible to use -multiple such commands, which are split on ``+``. For example:: +multiple such commands, which are split on ``+``. For example: + +.. code-block:: shell ./dfhack +load-save region1 "Dwarf Fortress.exe" +devel/print-args Hello! +enable workflow @@ -93,7 +95,9 @@ but ``dfhack-run`` can be useful in a variety of circumstances: - from external programs or scripts - if DF or DFHack are not responding -Examples:: +Examples: + +.. code-block:: shell ./dfhack-run cursecheck dfhack-run kill-lua @@ -456,7 +460,9 @@ Environment variables ===================== DFHack's behavior can be adjusted with some environment variables. For example, -on UNIX-like systems:: +on UNIX-like systems: + +.. code-block:: shell DFHACK_SOME_VAR=1 ./dfhack diff --git a/docs/Documentation.rst b/docs/Documentation.rst index 067f6bf90..f447d8e2b 100644 --- a/docs/Documentation.rst +++ b/docs/Documentation.rst @@ -57,7 +57,9 @@ as the in-console documentation by (e.g.) printing it when a ``-help`` argument is given. The docs **must** have a heading which exactly matches the command, underlined -with ``=====`` to the same length. For example, a lua file would have:: +with ``=====`` to the same length. For example, a lua file would have: + +.. code-block:: lua local helpstr = [====[ @@ -69,6 +71,8 @@ with ``=====`` to the same length. For example, a lua file would have:: ]====] +.. highlight:: rst + Where the heading for a section is also the name of a command, the spelling and case should exactly match the command to enter in the DFHack command line. @@ -118,6 +122,8 @@ Scripts have link targets created automatically. Building the documentation ========================== +.. highlight:: shell + Required dependencies --------------------- In order to build the documentation, you must have Python with Sphinx diff --git a/docs/Lua API.rst b/docs/Lua API.rst index 8707a0d99..70016804e 100644 --- a/docs/Lua API.rst +++ b/docs/Lua API.rst @@ -1,3 +1,5 @@ +.. highlight:: lua + .. _lua-api: ############## diff --git a/docs/Memory-research.rst b/docs/Memory-research.rst index 3f615750a..9729072f5 100644 --- a/docs/Memory-research.rst +++ b/docs/Memory-research.rst @@ -119,7 +119,9 @@ GDB `GDB `_ is technically cross-platform, but tends to work best on Linux, and DFHack currently only offers support for using GDB on 64-bit Linux. To start with GDB, pass ``-g`` to the DFHack launcher -script:: +script: + +.. code-block:: shell ./dfhack -g diff --git a/docs/Plugins.rst b/docs/Plugins.rst index 55ec4c040..dc225d801 100644 --- a/docs/Plugins.rst +++ b/docs/Plugins.rst @@ -1443,7 +1443,9 @@ can be displayed on the main fortress mode screen: The file :file:`dfhack-config/dwarfmonitor.json` can be edited to control the positions and settings of all widgets displayed. This file should contain a JSON object with the key ``widgets`` containing an array of objects - see the -included file in the ``dfhack-config`` folder for an example:: +included file in the ``dfhack-config`` folder for an example: + +.. code-block:: lua { "widgets": [ diff --git a/library/xml b/library/xml index d8dab1b75..935b687ee 160000 --- a/library/xml +++ b/library/xml @@ -1 +1 @@ -Subproject commit d8dab1b758f7e08fd6cf32e32c04d2389d95e158 +Subproject commit 935b687ee65a7d5f470c0c86e50ef80634e1b884 diff --git a/scripts b/scripts index 4e6bfa81f..a6d5df4e7 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 4e6bfa81f89f93cd0c5abe2775a37ae5ffeaa3f7 +Subproject commit a6d5df4e73f06b4f8a829baeca97f0d63830b65b