Skip to content
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

gh-105812: [PoC] add :deco: role and adapt some rst files #118743

Closed
wants to merge 6 commits into from

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented May 7, 2024

@erlend-aasland
Copy link
Contributor Author

This works fine for :deco:`mydeco` , but fails for :deco:`!mydeco` . I know nothing about Sphinx internals; pointers appreciated :)

I'm probably butchering the Sphinx/docutils API here; apologies in advance
@erlend-aasland
Copy link
Contributor Author

I'm probably misusing the docutils/Sphinx API here, but I got this working using a custom inner node class. Perhaps overriding result_nodes() is more preferable?

Anyway, here are some screenshots:

Screenshot 2024-05-20 at 12 57 26 Screenshot 2024-05-20 at 12 57 38

@erlend-aasland
Copy link
Contributor Author

Well, older versions of Sphinx don't like it; I guess I should consider overriding result_nodes() instead.

@erlend-aasland erlend-aasland marked this pull request as draft October 14, 2024 23:32
@erlend-aasland
Copy link
Contributor Author

I'll work on this locally instead of polluting the CPython PR list.

@erlend-aasland erlend-aasland deleted the docs/deco-role branch November 5, 2024 11:50
@AA-Turner
Copy link
Member

@erlend-aasland I'd accept this as a feature in Sphinx, if you'd be interested -- we could then backport here.

A

@erlend-aasland
Copy link
Contributor Author

@erlend-aasland I'd accept this as a feature in Sphinx, if you'd be interested -- we could then backport here.

Definitely! I need some help hashing this out; I haven't found the time to delve into the nitty gritty Sphinx details.

@erlend-aasland
Copy link
Contributor Author

@AA-Turner: I created sphinx-doc/sphinx#13105.

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.

2 participants