Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

feat: Provide hook interface, use it to expand identifiers and attach additional context to references#46

Merged
pawamoy merged 5 commits intomainfrom
hooks
Sep 1, 2024
Merged

feat: Provide hook interface, use it to expand identifiers and attach additional context to references#46
pawamoy merged 5 commits intomainfrom
hooks

Conversation

@pawamoy
Copy link
Member

@pawamoypawamoy commentedMay 14, 2024
edited
Loading

This will allow a few things (some immediately, and some later):

  • immediately: allow handlers to customize how identifiers in references are handled (for example to support relative references, seeParse.-prefixed reference identifiers (relative identifiers) #37)
  • immediately: allow better error messages by providing more context around failed cross-refs
  • immediately (with a bit more thinking & work): allow customizing anchors while retaining full autorefs ability (seeTrim anchors crystal#8) actually not relevant
  • later: allow cross-language references (using Sphinx-like domain context)

This PR is the foundation for a follow-up PR in mkdocstrings:mkdocstrings/mkdocstrings#666. The changes over there actually allow handlers to hook into autorefs, while this PR here only provides the contract/interface.

Thisprivate PR shows an example hook implementation in mkdocstrings-python Insiders to support relative cross-refs using objects' scope to resolve them.

@pawamoypawamoy merged commitfb8df98 intomainSep 1, 2024
@pawamoypawamoy deleted the hooks branchSeptember 1, 2024 17:33
pawamoy added a commit to mkdocstrings/mkdocstrings that referenced this pull requestSep 1, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@pawamoy

[8]ページ先頭

©2009-2026 Movatter.jp