diff --git a/src/zeekygen/utils.cc b/src/zeekygen/utils.cc index 05779dc1bc..094cd58424 100644 --- a/src/zeekygen/utils.cc +++ b/src/zeekygen/utils.cc @@ -70,7 +70,7 @@ bool prettify_params(string& s) if ( identifier == "Returns" ) subst = ":returns"; else - subst = ":" + identifier; + subst = ":param " + identifier; s.replace(identifier_start_pos, identifier.size(), subst); return true; diff --git a/testing/btest/Baseline/doc.zeekygen.example/example.rst b/testing/btest/Baseline/doc.zeekygen.example/example.rst index 12e2f23aa6..aa2b0d3601 100644 --- a/testing/btest/Baseline/doc.zeekygen.example/example.rst +++ b/testing/btest/Baseline/doc.zeekygen.example/example.rst @@ -260,7 +260,7 @@ Events link. Use the see role instead: :zeek:see:`ZeekygenExample::a_function`. - :name: Describe the argument here. + :param name: Describe the argument here. Functions ######### @@ -275,11 +275,11 @@ Functions empty comments is optional, but improves readability of script. - :tag: Function arguments can be described + :param tag: Function arguments can be described like this. - :msg: Another param. + :param msg: Another param. :returns: Describe the return type here. diff --git a/testing/btest/Baseline/doc.zeekygen.func-params/autogen-reST-func-params.rst b/testing/btest/Baseline/doc.zeekygen.func-params/autogen-reST-func-params.rst index 598c449a66..4cc37b9d7c 100644 --- a/testing/btest/Baseline/doc.zeekygen.func-params/autogen-reST-func-params.rst +++ b/testing/btest/Baseline/doc.zeekygen.func-params/autogen-reST-func-params.rst @@ -7,9 +7,9 @@ This is a global function declaration. - :i: First param. + :param i: First param. - :j: Second param. + :param j: Second param. :returns: A string. @@ -23,9 +23,9 @@ This is a record field function. - :i: First param. + :param i: First param. - :j: Second param. + :param j: Second param. :returns: A string. diff --git a/testing/btest/Baseline/doc.zeekygen.identifier/test.rst b/testing/btest/Baseline/doc.zeekygen.identifier/test.rst index a63a5439b7..219c92da8b 100644 --- a/testing/btest/Baseline/doc.zeekygen.identifier/test.rst +++ b/testing/btest/Baseline/doc.zeekygen.identifier/test.rst @@ -212,11 +212,11 @@ empty comments is optional, but improves readability of script. - :tag: Function arguments can be described + :param tag: Function arguments can be described like this. - :msg: Another param. + :param msg: Another param. :returns: Describe the return type here. @@ -234,7 +234,7 @@ link. Use the see role instead: :zeek:see:`ZeekygenExample::a_function`. - :name: Describe the argument here. + :param name: Describe the argument here. .. zeek:id:: ZeekygenExample::function_without_proto :source-code: zeekygen/example.zeek 176 184