You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We already do this if the code block is the first element in the docstring, in order to support the common pattern where the function signature is in an indented code block
foo()
Docs of foo...
However, it is not unreasonable to have multiple signatures in a docstring (see #1933 (comment)), and so it might be convenient to highlight them all. On the other hand, any non-Julia code block would need to get an explicit ```none. So I guess the question is which is more common in a docstring: multiple signatures or unhighlighted text blocks (hence the speculative label).
It might make sense to distinguish indented vs non-indented code blocks, but we do not get that information from the parser as far as I know.
It could also be implemented as an option (e.g. docstring_auto_highlight = :none, :first, :all, defaulting to :first).
We already do this if the code block is the first element in the docstring, in order to support the common pattern where the function signature is in an indented code block
foo() Docs of foo...
However, it is not unreasonable to have multiple signatures in a docstring (see #1933 (comment)), and so it might be convenient to highlight them all. On the other hand, any non-Julia code block would need to get an explicit
```none
. So I guess the question is which is more common in a docstring: multiple signatures or unhighlighted text blocks (hence the speculative label).docstring_auto_highlight = :none, :first, :all
, defaulting to:first
).Related issue: #1101
The text was updated successfully, but these errors were encountered: