[OpenStack-docs] [RST] difference between the code and the code-block directive

Brian Moss kallimachos at gmail.com
Tue Jul 28 00:40:21 UTC 2015


I use .. code-block:: when I need to specify :linenos:, otherwise I save
myself a few characters and write .. code::

That said, I see no reason why we couldn't standardize on .. code-block::.
It allows us to specify the language of the block, turn on line numbers,
emphasize selected lines of code, and do some of the nifty things.

-Brian

On 28 July 2015 at 07:46, Meg McRoberts <dreidellhasa at yahoo.com> wrote:

> Good questions...
>
> I admit that I tend to use the plain :: by default.  If that doesn't
> format correctly,
> then I usually flip to code-block.
>
> I have some notes about information to add to
> https://wiki.openstack.org/wiki/Documentation/Markup_conventions#Code_or_data_.28block_and_inline.29
> so, once we agree about this, I'll write it up.
>
>   ------------------------------
>  *From:* Christian Berendt <christian at berendt.io>
> *To:* "openstack-docs at lists.openstack.org" <
> Openstack-docs at lists.openstack.org>
> *Sent:* Monday, July 27, 2015 2:28 PM
> *Subject:* [OpenStack-docs] [RST] difference between the code and the
> code-block directive
>
> Sometimes we use .. code:: and sometimes we use .. code-block::.
>
> What is the difference? Does it makes sense to only use .. code-block::
> and to remove the usage of .. code::?
>
> Christian.
>
> --
> Christian Berendt
> Cloud Solution Architect
> Mail: berendt at b1-systems.de
>
> B1 Systems GmbH
> Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
> GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
>
> _______________________________________________
> OpenStack-docs mailing list
> OpenStack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>
>
>
> _______________________________________________
> OpenStack-docs mailing list
> OpenStack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20150728/c137efe1/attachment.html>


More information about the OpenStack-docs mailing list