-
Notifications
You must be signed in to change notification settings - Fork 17
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
Use code formatting for all values (choice entries, defaults, samples) #38
Comments
Output right now: https://docs.ansible.com/ansible/devel/collections/ansible/builtin/apt_module.html#parameter-purge As you can see, values inside descriptions use |
Would this mean dropping the 'bold' for the default value?, or would you have a slightly tweaked CSS for the "default value" code block? |
I would keep the other formatting. (The sphinx extension will need to provide more roles, but we already collected some experience with this in the semantic markup PR :) ) |
Consistency is a good thing :-) +1 for making it consistent. Since we are past core feature freeze, I would suggest we hold off on implementing until/unless we have to implement some other must-have fix into |
It would be a lot easier if ansible-core would not start using new constructs in docs that require new features that aren't available in antsibull-docs after feature freeze. Then we could have finished this stuff already weeks ago. This change discussed here is mainly for improving the rendering of the combine filter docs in https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/filter/combine.yml#L26-L32, that with the currently released antsibull-docs version (that stable-2.14 and devel use) results in a rendering error (https://docs.ansible.com/ansible/devel/collections/ansible/builtin/combine_filter.html). |
well, biased I guess since I suggested this, but to my eyes the code formatting is way better for choices and defaults. I would've suggested removing the quotes from string values, but I suppose that is useful to distinguish between strings and non-strings, ( |
@briantist the quotes are there because these values are formatted as JSON. I guess we could also use YAML (one-line) serialization, but that is another discussion I guess ;) |
I created a PR for this: #42 |
Right now, while values in the description that are (correctly) formtated with
C(...)
have code / teletype formatting, other auto-generated values such as choice list entries, defaults, and samples, are formatted as regular text (only with different colors).@briantist suggested (#36 (comment)) to format choice list entries also as code, and I extended that suggestion to format also defaults and samples values as code.
What do you think?
The text was updated successfully, but these errors were encountered: