Format docstrings with Runic#5604
Open
fredrikekre wants to merge 1 commit into
Open
Conversation
fredrikekre
commented
Apr 21, 2026
|
|
||
| """ | ||
| render_asap([callback::Function, ]screen, N) | ||
| render_asap([callback::Function]screen, N) |
Contributor
Author
There was a problem hiding this comment.
This look a bit odd now for example. I would (manually) rewrite this as
render_asap([callback::Function], screen, N)
or
render_asap(screen, N)
render_asap(callback::Function, screen, N)
Contributor
Author
|
Also imlemented formatting of julia code in markdown files. |
b5f2d80 to
fd6ae10
Compare
Contributor
Author
|
Runic 1.7 is released with these changes so I updated the CI files etc too. Probably need some manual edits (but I will let someone else handle that). |
Collaborator
Contributor
Author
No. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since you have adopted Runic I am using your code base for testing things and now to solicit input on new features :p
I have implemented docstring formatting in Runic. This is the results. Runic assumes that fenced code blocks are valid Julia but for indented blocks (typically for function signatures in docstrings) the syntax isn't always valid Julia code, in particular when it comes to using
[...]for optional arguments. I initially thought we should filter out such docstrings but I settled on: "if it parses we format it". This leads to some quirks (see inline comments) but I think it might be better to rewrite those cases to valid Julia code anyway.