Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to comment a string in restructured text?

The comment of HTML is <!-- .. -->, how can I make this comment block with restructured text? In order words, how can I comment out some of the lines in restructured text?

like image 840
prosseek Avatar asked Jan 24 '11 15:01

prosseek


2 Answers

From the reference:

Arbitrary indented text may follow the explicit markup start and will be processed as a comment element.

..    _This: is a comment!  ..    [and] this!  ..    this:: too!  ..    |even| this:: ! 

It is also possible to put the comment on the same line as the double dots:

.. Avoid this type of comment 

This is however considered bad practice since it may lead to unintended consequences if the comment matches a proper markup construct, as pointed out by @CecilCurry in the comment below.

like image 81
jball Avatar answered Oct 23 '22 09:10

jball


For comments, add 2 periods .. followed by a newline and then your comment indented.

Example:

..   comment goes here 
like image 25
Miguel Mota Avatar answered Oct 23 '22 11:10

Miguel Mota