Skip to content

Fix operator binding rendering for doc headers#2883

Merged
fingolfin merged 3 commits intomasterfrom
codex/fix-2844-operator-binding-rendering
Feb 20, 2026
Merged

Fix operator binding rendering for doc headers#2883
fingolfin merged 3 commits intomasterfrom
codex/fix-2844-operator-binding-rendering

Conversation

@fingolfin
Copy link
Collaborator

@fingolfin fingolfin commented Feb 15, 2026

Normalize binding display to canonical Julia syntax for operator bindings by using show(Symbol) formatting, and use it in Object printing plus HTML/LaTeX doc rendering paths. Add regression tests for :, ==, +, and non-operator bindings.

Fixes #2844

Created by Codex


Question is: Do we want this? I've also submitted JuliaLang/julia#61043 to fix the printing of Bindings in Julia, and assuming this is approved and backported, it would also take care of the issue.

This PR is more like a measure to make things good in the meantime.

It also was another good training exercise for using Codex ;-). So I did not invest much into this, and won't be upset if we end up not merging it.

@fingolfin fingolfin requested a review from mortenpi February 15, 2026 19:49
@fingolfin fingolfin closed this Feb 15, 2026
@fingolfin fingolfin reopened this Feb 15, 2026
@fingolfin fingolfin added Format: LaTeX Related to the LaTeX / PDF output Format: HTML Related to the default HTML output Type: Bugfix labels Feb 16, 2026
Normalize binding display to canonical Julia syntax for operator
bindings by using show(Symbol) formatting, and use it in Object
printing plus HTML/LaTeX doc rendering paths. Add regression tests
for :, ==, +, and non-operator bindings.

Co-authored-by: Codex <codex@openai.com>
@fingolfin fingolfin force-pushed the codex/fix-2844-operator-binding-rendering branch from 2e06c0e to e24fead Compare February 16, 2026 11:24
@mortenpi
Copy link
Member

This seems fine to me actually. I don't mind if we add the bindingstring abstraction, rather than relying on string directly.

Implementation-wise, we could have a version check in there (once the upstream PR is merged), so that it would use Base.Docs directly still, for Julia versions where it is fixed?

@fingolfin
Copy link
Collaborator Author

Since I just merged JuliaLang/julia#61043, we can argue whether we still need this. I'd say yes, because people will still be building their manuals with Julia versions older than 1.14 for some time. Of course that PR might get backported... But still, that will take time. With this PR, we can get a fix into the hands of our users now. If it becomes unnecessary one day, we still remove it. (For that, it'd be good to add a comment why it is necessary in the first place. On it.)

fingolfin and others added 2 commits February 20, 2026 00:26
Co-authored-by: Morten Piibeleht <morten.piibeleht@gmail.com>
@fingolfin fingolfin enabled auto-merge (squash) February 20, 2026 15:04
@fingolfin fingolfin merged commit d1ab4fe into master Feb 20, 2026
26 of 29 checks passed
@fingolfin fingolfin deleted the codex/fix-2844-operator-binding-rendering branch February 20, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Format: HTML Related to the default HTML output Format: LaTeX Related to the LaTeX / PDF output Type: Bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docstrings for Base.:(:) is shown as Base.::

2 participants