diff --git a/docs/scripting.xml b/docs/scripting.xml
index 278dc7f23..4e89b59b3 100644
--- a/docs/scripting.xml
+++ b/docs/scripting.xml
@@ -1743,15 +1743,14 @@ local localip, localport = client_service:get_info()
It is good practice to document every public function and table in a
script or module. Additionally every script and module should have
its own file-level documentation. A documentation comment at the
- beginning of a file (that is not followed by a function or table
+ beginning of a file (one that is not followed by a function or table
definition) applies to the entire file. File-level documentation can
and should be several paragraphs long, with all the high-level
information useful to a developer using a module or a user running a
script.
shows documenatation for the comm module (with a
- few paragraphs removed to save space). Recall that module- and
- script-level comments are at the very beginning of a file.
+ few paragraphs removed to save space).
@@ -1824,6 +1823,23 @@ license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
categories = {"discovery", "external"}
+
+ NSEDocfor C modules
+
+ Compiled NSE modules are also documented with NSEDoc, even though
+ they have no Lua source code. Each compiled module has a file
+ modulename.luadoc.luadoc filename extension
+ that is kept in the nselib directory alongside
+ the Lua modules. This file lists and documents the functions and
+ tables in the compiled module as though they were written in Lua.
+ Only the name of each function is required, not its definition (not
+ even end). You must use the
+ @name and @class tags when
+ documenting a table to assist the documentation parser in
+ identifying it. There are several examples of this method of
+ documentation in the Nmap source distribution.
+
+
NSE Documentation Tags
@@ -1950,25 +1966,6 @@ categories = {"discovery", "external"}
from the contents of a comment. @release has not been used with
NSEDoc. -->
-
- NSE Documentation for C Modules
- NSEDocfor C modules
-
- NSEDoc documentation can be written for libraries as well as scripts.
- But while Lua modules are documented in much the same way, a C module
- requires special consideration. You must write a
- .luadoc.luadoc filename extension
- file to accompany the C module in order for it to be
- documented. These files are typically placed in the nselib directory
- next to other Lua modules. The file itself will list all functions
- for the C module as though
- they were written in Lua. You may however remove certain syntactical
- structures (particularly, end) when writing this
- document, as it is never compiled by Lua. Remember you may use the
- @class tag to also help the parser
- know what it is you are documenting, especially for tables.
-
-