Some languages have a special character that
indicates the rest of the line is a comment.
If you embed sphinx documentation in this type of comment,
you need to inform xrst of the special character so it does
not end up in your .rst output file.
The value of ch must be one non white space character.
There must be at least one white space character
between xrst_comment_ch and ch.
Leading and trailing white space around ch is ignored.
Spaces and tabs before the special character,
the special character,
and one space directory after the special character (if present),
are removed from the input stream before any xrst processing.
For example, if # is the special character,
the following input has the heading Factorial
and the def token indented the same amount:
comment_ch_cmd¶
View page sourceComment Character Command¶
Syntax¶
{xrst_comment_ch
ch}
Purpose¶
Some languages have a special character that indicates the rest of the line is a comment. If you embed sphinx documentation in this type of comment, you need to inform xrst of the special character so it does not end up in your
.rst
output file.ch¶
The value of ch must be one non white space character. There must be at least one white space character between
xrst_comment_ch
and ch. Leading and trailing white space around ch is ignored.Input Stream¶
Spaces and tabs before the special character, the special character, and one space directory after the special character (if present), are removed from the input stream before any xrst processing. For example, if
#
is the special character, the following input has the heading Factorial and thedef
token indented the same amount:Indentation¶
The indent commands are processed before removing the special character and its white space.
Example¶
comment_ch_example