Fix dedent for C# code, upgrade sphinx

The C# include for the .NET SDK has to be indented to follow
the standards. This patch fixes up the includes so that the
indenting is appropriate for in-line reading of snippets

Since Sphinx 1.3 is required for dedent, this changes the
test requirements for the api-site repository to upgrade
the sphinx version.

Change-Id: I539df7bc2c08ac6b31ba8ba4b7b94cf66b3d58a4
Co-Authored-By: Liang Bo <liang.bo@99cloud.net>
This commit is contained in:
Tom Fifield 2015-07-27 11:29:26 +08:00
parent 9eb44d6184
commit 16b37909a4
2 changed files with 10 additions and 1 deletions

View File

@ -230,6 +230,7 @@ are familiar with running code snippets in your language of choice.
.. literalinclude:: ../samples/dotnet/getting_started.cs
:language: c#
:dedent: 3
:start-after: step-1
:end-before: step-2
@ -307,6 +308,7 @@ To list the images that are available in your cloud, run some API calls:
.. literalinclude:: ../samples/dotnet/getting_started.cs
:language: c#
:dedent: 3
:start-after: step-2
:end-before: step-3
@ -370,6 +372,7 @@ You can also get information about available flavors:
.. literalinclude:: ../samples/dotnet/getting_started.cs
:language: c#
:dedent: 3
:start-after: step-3
:end-before: step-4
@ -442,6 +445,7 @@ image that you picked in the previous section:
.. literalinclude:: ../samples/dotnet/getting_started.cs
:language: c#
:dedent: 3
:start-after: step-4
:end-before: step-5
@ -492,6 +496,7 @@ Next, choose which flavor you want to use:
.. literalinclude:: ../samples/dotnet/getting_started.cs
:language: c#
:dedent: 3
:start-after: step-5
:end-before: step-6
@ -565,6 +570,7 @@ Create the instance.
.. literalinclude:: ../samples/dotnet/getting_started.cs
:language: c#
:dedent: 3
:start-after: step-6
:end-before: step-7
@ -598,6 +604,7 @@ If you list existing instances:
.. literalinclude:: ../samples/dotnet/getting_started.cs
:language: c#
:dedent: 3
:start-after: step-7
:end-before: step-8
@ -672,6 +679,7 @@ money. Destroy cloud resources to avoid unexpected expenses.
.. literalinclude:: ../samples/dotnet/getting_started.cs
:language: c#
:dedent: 3
:start-after: step-8
:end-before: step-9

View File

@ -5,7 +5,8 @@ pbr>=0.6,!=0.7,<1.0
openstack-doc-tools>=0.23
doc8 # Apache-2.0
Pygments
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
# At least 1.3 is required for dedent in code blocks. Capped to 1.3 to not get an automatic update to any newer versions.
sphinx>=1.3,!=1.3b1,<1.4
openstackdocstheme>=1.0.7
nwdiag
sphinxcontrib-nwdiag