From 1be3ac36df476d353d8da4def31a9825eb6452ef Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 6 Jan 2017 12:33:00 -0800 Subject: [PATCH] Fix block highlighting Found out that we change the default highlighting to yaml. So explicitly mark python code blocks as such. --- .../rst/dev_guide/developing_program_flow_modules.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/docsite/rst/dev_guide/developing_program_flow_modules.rst b/docs/docsite/rst/dev_guide/developing_program_flow_modules.rst index 227ae96357..5f5572bebb 100644 --- a/docs/docsite/rst/dev_guide/developing_program_flow_modules.rst +++ b/docs/docsite/rst/dev_guide/developing_program_flow_modules.rst @@ -86,11 +86,11 @@ JSONARGS Scripts can arrange for an argument string to be placed within them by placing the string ``<>`` somewhere inside of the -file. The module typically sets a variable to that value like this:: +file. The module typically sets a variable to that value like this:: python json_arguments = """<>""" -Which is expanded as:: +Which is expanded as:: python json_arguments = """{"param1": "test's quotes", "param2": "\"To be or not to be\" - Hamlet"}""" @@ -456,7 +456,9 @@ modules should just use :meth:`AnsibleModule.log` which will then make use of this. If a module has to use this on its own, it should instantiate an :class:`AnsibleModule` and then retrieve the name of the syslog facility from :attr:`AnsibleModule._syslog_facility`. The code will look slightly different -than it did under :ref:`module_replacer` due to how hacky the old way was:: +than it did under :ref:`module_replacer` due to how hacky the old way was + +:: python # Old way import syslog