René's URL Explorer Experiment


Title: Add bookmark creation and lookup by pseudosavant · Pull Request #1615 · python-openxml/python-docx · GitHub

Open Graph Title: Add bookmark creation and lookup by pseudosavant · Pull Request #1615 · python-openxml/python-docx

X Title: Add bookmark creation and lookup by pseudosavant · Pull Request #1615 · python-openxml/python-docx

Description: Problem and behavior Document generators need public bookmark creation and lookup without replacing existing targets. This adds Document.bookmarks with add(name, paragraph=...), add(name, runs=...), and case-insensitive get(name). Bookmark proxies expose the stored name and their starting main-story paragraph. Paragraph targets are collapsed ranges at the start of a paragraph. Run ranges cover consecutive direct runs of one paragraph. Body paragraphs and table cells are supported for creation. Invalid names, duplicate names, reversed or nonconsecutive ranges, detached paragraphs, and cross-document or other-story targets are rejected before mutation. New names use a documented portable subset of Word's 40-character limit. Existing names are preserved. IDs and names in related Word stories are reserved, including unparsed note parts. Lookup includes those names and returns no paragraph proxy for unsupported stories. No rename or deletion behavior is introduced. Validation New unit and acceptance coverage for paragraph targets, run ranges, invalid ranges, duplicates, related-story collisions, saved-package preservation, and a Word-authored fixture. Word navigation was checked with two identically named heading paragraphs and distinct targets. Full upstream tests and acceptance scenarios pass on this branch. Scope and design This is a draft for API feedback and relates to #445. It is based directly on upstream master and excludes fork packaging and other fork features. My fork separately extends the hyperlink authoring API proposed in #1611 with an anchor argument. That integration is kept in a separate commit so this bookmark API can be reviewed independently. Markdown heading slugs and unresolved-link diagnostics remain in the downstream converter. Names and API conventions can change to follow upstream feedback.

Open Graph Description: Problem and behavior Document generators need public bookmark creation and lookup without replacing existing targets. This adds Document.bookmarks with add(name, paragraph=...), add(name, runs=...)...

X Description: Problem and behavior Document generators need public bookmark creation and lookup without replacing existing targets. This adds Document.bookmarks with add(name, paragraph=...), add(name, runs=...)...

Opengraph URL: https://github.com/python-openxml/python-docx/pull/1615

X: @github

direct link

Domain: redirect.github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:9cf622c1-c478-af58-1c4d-e6bbcc148945
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE4A8:12916F:7BABC:A3276:6AFF7CC8
html-safe-noncea57de7b609ee2ec5c174a0aa5179dab681a2ced0a8ff50a41da4d66941942773
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNEE4OjEyOTE2Rjo3QkFCQzpBMzI3Njo2QUZGN0NDOCIsInZpc2l0b3JfaWQiOiIyOTI3Nzc5MDcwMzE1ODIyMjgwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace413ed1f640d56b77d26e3c56b171b5a36dd0cbd5914136ffa74c6818dac1c43
hovercard-subject-tagpull_request:4629953673
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python-openxml/python-docx/pull/1615/files
twitter:imagehttps://avatars.githubusercontent.com/u/455424?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/455424?s=400&v=4
og:image:altProblem and behavior Document generators need public bookmark creation and lookup without replacing existing targets. This adds Document.bookmarks with add(name, paragraph=...), add(name, runs=...)...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb5a2047dbbde77e0ba2f8dfd78621e8a7313a105f7437ca693fcccd16cd137ee
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python-openxml/python-docx git https://github.com/python-openxml/python-docx.git
octolytics-dimension-user_id3403760
octolytics-dimension-user_loginpython-openxml
octolytics-dimension-repository_id13592924
octolytics-dimension-repository_nwopython-openxml/python-docx
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id13592924
octolytics-dimension-repository_network_root_nwopython-openxml/python-docx
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release83e3dfa4de364d61589204ed35e53b2b7f77fba2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://redirect.github.com/python-openxml/python-docx/pull/1615/files#start-of-content
https://redirect.github.com/
Sign inhttps://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fpull%2F1615%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fpull%2F1615%2Ffiles
Sign uphttps://redirect.github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python-openxml%2Fpython-docx
Reloadhttps://redirect.github.com/python-openxml/python-docx/pull/1615/files
Reloadhttps://redirect.github.com/python-openxml/python-docx/pull/1615/files
Reloadhttps://redirect.github.com/python-openxml/python-docx/pull/1615/files
python-openxmlhttps://redirect.github.com/python-openxml
python-docxhttps://redirect.github.com/python-openxml/python-docx
Codehttps://redirect.github.com/python-openxml/python-docx
Issues387 (387)https://redirect.github.com/python-openxml/python-docx/issues
Pull requests167 (167)https://redirect.github.com/python-openxml/python-docx/pulls
Actionshttps://redirect.github.com/python-openxml/python-docx/actions
Projectshttps://redirect.github.com/python-openxml/python-docx/projects
Wikihttps://redirect.github.com/python-openxml/python-docx/wiki
Security and qualityhttps://redirect.github.com/python-openxml/python-docx/security
Insightshttps://redirect.github.com/python-openxml/python-docx/insights
Sign up for GitHub https://redirect.github.com/signup?return_to=%2Fpython-openxml%2Fpython-docx%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://redirect.github.com/login?return_to=%2Fpython-openxml%2Fpython-docx%2Fissues%2Fnew%2Fchoose
pseudosavanthttps://redirect.github.com/pseudosavant
python-openxml:masterhttps://redirect.github.com/python-openxml/python-docx/tree/master
pseudosavant:codex/bookmarks-upstreamhttps://redirect.github.com/pseudosavant/python-docx/tree/codex/bookmarks-upstream
Conversation 0 https://redirect.github.com/python-openxml/python-docx/pull/1615
Commits 1 https://redirect.github.com/python-openxml/python-docx/pull/1615/commits
Checks 0 https://redirect.github.com/python-openxml/python-docx/pull/1615/checks
Files changed https://redirect.github.com/python-openxml/python-docx/pull/1615/files
Please reload this pagehttps://redirect.github.com/python-openxml/python-docx/pull/1615/files
Add bookmark creation and lookup https://redirect.github.com/python-openxml/python-docx/pull/1615/files#top
Show all changes 1 commit https://redirect.github.com/python-openxml/python-docx/pull/1615/files
f11dc96 Add bookmark creation and lookup pseudosavant Sep 24, 2026 https://redirect.github.com/python-openxml/python-docx/pull/1615/commits/f11dc965da9151079615e2b3d4483126870cbad4
Clear filters https://redirect.github.com/python-openxml/python-docx/pull/1615/files
Please reload this pagehttps://redirect.github.com/python-openxml/python-docx/pull/1615/files
Please reload this pagehttps://redirect.github.com/python-openxml/python-docx/pull/1615/files
bookmarks.rst https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-f969ce74369ab13c62e3cd1bf2331fd22dd831e8110de27debcc827f27b10775
index.rst https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8d068e8797e88947c320f79e856c3e16a72b730124a8f9d7031e2c4680dfa534
bookmarks.rst https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-f6e9cb3372761810bb848685a21bbc46b5a9bad9f2b1fd7e2b147d588df18349
doc-bookmarks.feature https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-447e433656e76bb00633d01249f28ae9bb19acbc10a3785b0356e57ac9837277
bookmarks.py https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-d812dc12f005f7beabf3818507e2d1d0a34c83b22dd22a997d0b83d1762e17f4
bookmarks.py https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-f61ebe63651231b685cd8255a0509b2d160766af0e901f65e0fd8fa3a978556b
document.py https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8b5aed35cea2e719e419af099e5d7d2f6ff97b5737b5329dcf66c57031999541
test_bookmarks.py https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-7b85c398b87e22aab872b0c8802b2ed0c9d39bf0586095514f7f871c6bde71d9
bookmarks-word.docx https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8ccfcdd2ddabaf8ca72f8e997b628652b508390560b7a5c8c8c0bbed6ab171f6
bookmarks-word.rst https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8982bade9f65a434a8a1a1da4591d4626325becf147126b0824081ca4ad756ee
docs/api/bookmarks.rsthttps://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-f969ce74369ab13c62e3cd1bf2331fd22dd831e8110de27debcc827f27b10775
View file https://redirect.github.com/python-openxml/python-docx/blob/f11dc965da9151079615e2b3d4483126870cbad4/docs/api/bookmarks.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/python-openxml/python-docx/pull/1615/{{ revealButtonHref }}
docs/index.rsthttps://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8d068e8797e88947c320f79e856c3e16a72b730124a8f9d7031e2c4680dfa534
View file https://redirect.github.com/python-openxml/python-docx/blob/f11dc965da9151079615e2b3d4483126870cbad4/docs/index.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/python-openxml/python-docx/pull/1615/{{ revealButtonHref }}
https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8d068e8797e88947c320f79e856c3e16a72b730124a8f9d7031e2c4680dfa534
https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8d068e8797e88947c320f79e856c3e16a72b730124a8f9d7031e2c4680dfa534
https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8d068e8797e88947c320f79e856c3e16a72b730124a8f9d7031e2c4680dfa534
docs/user/bookmarks.rsthttps://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-f6e9cb3372761810bb848685a21bbc46b5a9bad9f2b1fd7e2b147d588df18349
View file https://redirect.github.com/python-openxml/python-docx/blob/f11dc965da9151079615e2b3d4483126870cbad4/docs/user/bookmarks.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/python-openxml/python-docx/pull/1615/{{ revealButtonHref }}
features/doc-bookmarks.featurehttps://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-447e433656e76bb00633d01249f28ae9bb19acbc10a3785b0356e57ac9837277
View file https://redirect.github.com/python-openxml/python-docx/blob/f11dc965da9151079615e2b3d4483126870cbad4/features/doc-bookmarks.feature
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/python-openxml/python-docx/pull/1615/{{ revealButtonHref }}
features/steps/bookmarks.pyhttps://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-d812dc12f005f7beabf3818507e2d1d0a34c83b22dd22a997d0b83d1762e17f4
View file https://redirect.github.com/python-openxml/python-docx/blob/f11dc965da9151079615e2b3d4483126870cbad4/features/steps/bookmarks.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/python-openxml/python-docx/pull/1615/{{ revealButtonHref }}
src/docx/bookmarks.pyhttps://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-f61ebe63651231b685cd8255a0509b2d160766af0e901f65e0fd8fa3a978556b
View file https://redirect.github.com/python-openxml/python-docx/blob/f11dc965da9151079615e2b3d4483126870cbad4/src/docx/bookmarks.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/python-openxml/python-docx/pull/1615/{{ revealButtonHref }}
src/docx/document.pyhttps://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8b5aed35cea2e719e419af099e5d7d2f6ff97b5737b5329dcf66c57031999541
View file https://redirect.github.com/python-openxml/python-docx/blob/f11dc965da9151079615e2b3d4483126870cbad4/src/docx/document.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/python-openxml/python-docx/pull/1615/{{ revealButtonHref }}
https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8b5aed35cea2e719e419af099e5d7d2f6ff97b5737b5329dcf66c57031999541
https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8b5aed35cea2e719e419af099e5d7d2f6ff97b5737b5329dcf66c57031999541
https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8b5aed35cea2e719e419af099e5d7d2f6ff97b5737b5329dcf66c57031999541
https://redirect.github.com/python-openxml/python-docx/pull/1615/files#diff-8b5aed35cea2e719e419af099e5d7d2f6ff97b5737b5329dcf66c57031999541
Please reload this pagehttps://redirect.github.com/python-openxml/python-docx/pull/1615/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.