Comments (3)
fwiw, I looked at this today. It seems myst_parser
does not seem to be happy with our use of sphinx.utils.nodes.nested_parse_with_titles
. That should return a load of docutils nodes but the output is off.
Here's an example using reStructuredText:
and here's the equivalent using Markdown:
You can see that all the directives are outputted in raw form rather than being processed and nested as expected. I'm not sure how you'd go about fixing this, tbh.
from sphinx-click.
If anyone is interested in fixing this, there's a minimal reproducer here.
from sphinx-click.
Yes, and I think that's expected, I've used something similar when messing around with autodoc extensions. For that case, it was fine because the nature of the docstring (rst or md fomat) is known by the user, amd they could fine-tune and select the appropriate parser with eval-rst
.
The issue here are:
- the generated doc fragments do not account for which parser it is currently in, e.g.
sphinx-click/sphinx_click/ext.py
Line 344 in e8cf016
This could have an if statement to generate either format. It should be within anwith
to appropriately start-end the blocks - the api is monolithic, but something along the lines of sphinx autodoc would probably be more manageable
I think the only relevant references here is sphinx-autodoc2
, e.g. see their approach here (navigate to the concrete implementations for myst
and rst
)
from sphinx-click.
Related Issues (20)
- Nested subcommands improvement HOT 1
- Supports `.. click:example::` and `.. click:run::` directives HOT 3
- Option defaults with escape characters don't render correctly HOT 5
- <class ‘click.core.Command’>” of type “scripts.my module:mycommand” is not click.Command or click.Group.”click.BaseCommand” HOT 1
- metavar in docs does not match metavar in help output HOT 2
- Missing show_default detection via context_settings. HOT 1
- _format_envvars does not seem to support auto_envvar_prefix on group HOT 1
- remove "Required argument" from every click arg HOT 1
- Sphinx_click not working with Read The Docs HOT 2
- Issue with sphinx 7.0 HOT 2
- "\b" prevents formatting HOT 1
- Document sub-command only
- Show list of commands HOT 1
- Arguments don't show help text
- Conversion of restructured text to ANSI colored output in terminal HOT 1
- Add support for Flask's `with_appcontext` decorator HOT 2
- Missing tag for 5.2.2 HOT 1
- Click commands docstring in Sphinx format HOT 2
- Documentation of arguments HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sphinx-click.