Fix operator binding rendering for doc headers#2883
Conversation
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>
2e06c0e to
e24fead
Compare
|
This seems fine to me actually. I don't mind if we add the 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? |
|
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.) |
Co-authored-by: Morten Piibeleht <morten.piibeleht@gmail.com>
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.