Repository navigation
gh-83156: Add dedicated anchor for regexp syntax elements - #17470
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
bd537bb to
d711127
Compare
hugovk
left a comment
There was a problem hiding this comment.
I rebased this and build the docs:
cd Doc
make clean venv htmlAnd it does add anchors like syntax-dollar which you can visit by going to re.html#syntax-dollar:
But there's no ¶ hyperlink to click on and it's not obvious unless you know they exist or inspect the source. Should they be made more obvious?
|
Thanks for your PR, and sorry it has been open for so long! I think these anchors are useful, but agree with @hugovk that it's hard to discover them with no |
Thanks for getting back to the PR eventually. I will look into how to add the pillcrow |
|
I added a new commit that turns all the headings into It does change the look of the page a little bit but I don't think it's for the worse personally. Here's the before/after on my machine: I also took the opportunity to add an |
|
Adding However, if we do want easily-clickable and copyable external links with the fragment id in the rendered document, section headings would need to be added. I'm not sure a way around them also being in the ToC without hacks or pushing them down 2+ heading levels, but maybe @AA-Turner knows a way? This hopefully won't be an issue in the future, though, as if we adopt a Sphinx theme like Lutra that separates the inter- and intra-document ToC into left and right sidebars, and for which we can limit the ToC depth of the latter to 2, we could avoid displaying them by only adding one layer of higher level sections (which seems quite appropriate to the current document content) and limiting page ToCs to displaying only up to h3 heading levels. |
|
This PR is stale because it has been open for 30 days with no activity. |
|
It's been a while! OK, let's do this:
This way the terms can be linked, we get pilcrow hovers, and the sidebar isn't too busy. @bmispelon Would you like to bring this up-to-date and do this? Or shall I? |
Co-authored-by: Muse Code (Meta Muse Spark)
Apply :tocdepth: 3, add "Special characters" and "Special sequences" h3 sections, and demote the syntax term headings to h4. This keeps pilcrow permalinks for every term while keeping the sidebar compact. Co-authored-by: Muse Code (Meta Muse Spark)
Documentation build overview
|
Co-authored-by: Hugo van Kemenade <[email protected]>
|
Thanks @bmispelon for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Thanks @bmispelon for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
Sorry, @bmispelon and @ambv, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
Sorry, @bmispelon and @ambv, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
GH-160606 is a backport of this pull request to the 3.15 branch. |
|
GH-160607 is a backport of this pull request to the 3.14 branch. |





Uh oh!
There was an error while loading. Please reload this page.