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

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Oct 4, 2019

PR Summary

Clarification motivated by #15375 (comment).

Based on #10225 (section String values).

Plus a minor wording fix in one of the examples.

@timhoffm timhoffm added this to the v3.1-doc milestone Oct 4, 2019
@timhoffm timhoffm force-pushed the string-quotes branch 2 times, most recently from 79c1c56 to 476a03e Compare October 4, 2019 16:43
@@ -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.

@tacaswell tacaswell modified the milestones: v3.1-doc, v3.2.0 Oct 7, 2019
@tacaswell
Copy link
Member

Although this is a doc change, I don't think we need to pull it back to the 3.1 branches.

@dstansby dstansby merged commit 74ed294 into matplotlib:master Oct 7, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 7, 2019
dstansby added a commit that referenced this pull request Oct 7, 2019
…379-on-v3.2.x

Backport PR #15379 on branch v3.2.x (Document formatting strings in the docs)
@timhoffm timhoffm deleted the string-quotes branch October 7, 2019 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants