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
Windows: Fix documentation strings to be raw strings #20301
Conversation
The build failure here looks like my note about yaml also doing backslash escaping of strings:
I believe the right thing to fix it is to remove the quotes from that line and let yaml treat it as an implicit string. (single quotes would also work but I believe we're moving towards implicit strings unless there's a reason [ie differentiating between floats and strings in version fields]) |
Will fix ! |
00dac5d
to
c1b2723
Compare
ready_for_review |
It seems there's a conflict now with win_reboot.py If making raw string mandatory for windows examples and return strings seems like the way forward might be worth adding it to the module validation checks - https://github.com/ansible/ansible/tree/devel/test/sanity/validate-modules Just thinking - if it doesn't cause rendering problems, perhaps all modules should use raw strings? |
shipit - after rebase. |
c1b2723
to
75e1ad8
Compare
Rebased. ready_for_review |
This seems to fix things for ansible-doc, but not the rendered webdocs. sudo pip install sphinx then fired up firefox to look at the rendered pages in Would be great to have a way of fixing these once and for all that works for both ansible-doc and the generated html. needs_revision |
I propose this gets merged so the website looks fine again. |
I just checked and newly rendered win_template is broken with this PR applied unfortunately :-( So, unless I'm doing something incorrect while attempting to generate the web documentation, I still think this doesn't fix the problem for the site. |
@jhawkesworth Must be an amazing PR I did, because I haven't touched win_template in the PR and still it comes out wrong :-) |
@dagwieers Sorry trying to do too many things at once. Can anyone else verify that the html rendering is either improved or not by this PR? |
@jhawkesworth Even if the HTML rendering is not fixed by this, this PR is still going to be required to have a final fix. We don't want C:\temp to become C: |
Especially when using Windows paths they easily get confused as escaped sequences or unicode characters. So by default use raw strings This fixes ansible#20295
And some trailing whitespace fixes.
75e1ad8
to
d864776
Compare
ISSUE TYPE
COMPONENT NAME
windows modules
ANSIBLE VERSION
v2.3
SUMMARY
Especially when using Windows paths they easily get confused as escaped
sequences or unicode characters. So by default use raw strings
This fixes #20295
PS If needed we can do this for all modules so that this is consistent throughout all modules (and mistakes are reduced to a minimum).