Improve syntax highlighting in Documentation.rst

develop
lethosor 2022-07-23 18:26:40 -04:00
parent 62523bdcb1
commit c1a694cb18
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
1 changed files with 9 additions and 5 deletions

@ -94,6 +94,8 @@ For alternative link behaviors, see:
Documentation standards
=======================
.. highlight:: rst
Whether you're adding new code or just fixing old documentation (and there's plenty),
there are a few important standards for completeness and consistent style. Treat
this section as a guide rather than iron law, match the surrounding text, and you'll
@ -129,9 +131,7 @@ each command provided by the script or plugin. For scripts, this will just be th
Plugins that do not provide commands (i.e. they can just be enabled for some persistent effect or
they just export functionality via a Lua API) don't need any ``:dfhack-keybind:`` lines at all.
The first line of the text should then be the short description that will be used for the script
or plugin. For example, documentation for the ``build-now`` script might look like:
.. code-block:: rst
or plugin. For example, documentation for the ``build-now`` script might look like::
build-now
=========
@ -236,11 +236,15 @@ Note that since help text for external scripts and plugins is not rendered by Sp
it should be written in plain text. Any reStructuredText markup will not be processed.
For external scripts, the short description comes from a comment on the first line
(the comment marker and extra whitespace is stripped). For Lua, this would look like::
(the comment marker and extra whitespace is stripped). For Lua, this would look like:
.. code-block:: lua
-- A short description of my cool script.
and for Ruby scripts it would look like::
and for Ruby scripts it would look like:
.. code-block:: ruby
# A short description of my cool script.