Skip to content

Document formatting strings in the docs #15379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion doc/devel/documenting_mpl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ consistent with Python's documentation:

.. code-block:: rst

If *linestyles* is *None*, the 'solid' is used.
If *linestyles* is *None*, the default is 'solid'.

Do not use the ```default role``` or the ````literal```` role:

Expand All @@ -410,6 +410,12 @@ Use simple single or double quotes when giving string values, e.g.

If 'tight', try to figure out the tight bbox of the figure.

No ``'extra'`` literal quotes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this meant to be a title instead of part of the code block?

Copy link
Member Author

@timhoffm timhoffm Oct 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is intentional. Originally, I tried to put this in an inline lieteral:

The use of extra literal quotes around the text (````'extra'````) is discouraged.

However, it appears that four backticks followed by a single-quote or double-quote character are not interpreted correctly by Sphinx/ReST (in contrast followed by a letter works, e.g. ````literal```` further above).

I would like to have the negative example shown somewhere, but did not manage to write it as an inline literal. So I just added it it to the block literal.


The use of extra literal quotes around the text is discouraged. While they
slightly improve the rendered docs, they are cumbersome to type and difficult
to read in plain-text docs.

Parameter type descriptions
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The main goal for parameter type descriptions is to be readable and
Expand Down