Escape octothorpe characters in matplotlibrc#19289
Escape octothorpe characters in matplotlibrc#19289janniklasrose wants to merge 4 commits intomatplotlib:mainfrom
Conversation
Fixes #19288 When parsing matplotlibrc files, the octothorpe ('#') indicates a comment. Escaping with '\#' allows the parameter value to contain '#'
There was a problem hiding this comment.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
|
I agree with @timhoffm that quoted strings would be nicer (#19288 (comment)). |
|
Hi @janniklasrose - are you interested in continuing this work? If so, please mark the PR as ready for review and let us know if you need help with the rebase, we have instructions for that here. Thanks! |
|
I think this is effectively superseded by #22589, though. |
|
Closing because #22589 should solve the issue. Pleased report back in case there is still need for this PR. |
PR Summary
Fixes #19288
When parsing matplotlibrc files, the octothorpe (
#) indicates a comment. Escaping with\#now allows the parameter value itself to contain#. For example,results in
rcParams["text.latex.preamble"] == "\\newcommand{\\foo}[1]{\\bar{#1}}"as desired.PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsand runflake8 --docstring-convention=all).doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).