-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More stylistic updates to the manual for consistency #21463
Conversation
doc/src/manual/arrays.md
Outdated
@@ -716,7 +716,7 @@ Julia sparse matrices have the type `SparseMatrixCSC{Tv,Ti}`, where `Tv` is the | |||
values, and `Ti` is the integer type for storing column pointers and row indices.: | |||
|
|||
```julia | |||
type SparseMatrixCSC{Tv,Ti<:Integer} <: AbstractSparseMatrix{Tv,Ti} | |||
mutable struct SparseMatrixCSC{Tv,Ti<:Integer} <: AbstractSparseMatrix{Tv,Ti} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one's actually not mutable any more
8fbbec9
to
53a935b
Compare
@@ -29,7 +29,7 @@ you can redefine types and constants. You can't import the type names into `Mai | |||
to be able to redefine them there, but you can use the module name to resolve the scope. In other | |||
words, while developing you might use a workflow something like this: | |||
|
|||
``` | |||
```julia |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary? Isn't this the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. The default is no syntax coloring. Adding julia
highlights Julia keywords, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that true in Documenter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. If you look at this rendered in the docs as they stand (see https://docs.julialang.org/en/latest/manual/faq.html), the block has no color.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we change the default for Documenter code blocks to Julia code instead of putting julia
on blocks everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, didn't know you could do that. Then yeah, that's something to consider. In the meantime is this alright?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guess that would be equivalent to treating docstrings as a julia specific markdown extension, which i guess we already do with even numbers of backticks using math mode. worth an issue at documenter for discussion maybe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea. Regarding this PR, is there anything that should be changed, added, removed, etc, or is it okay as-is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, but no rush unless your next one will conflict. others may notice something I didn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is the last for the manual. Might go through the devdocs or something next, but nothing will conflict. I don't mean to rush, I just want to try to direct discussion back to the matter at hand. 😉
doc/src/manual/performance-tips.md
Outdated
@@ -389,17 +389,17 @@ Note the somewhat surprising fact that `T` doesn't appear in the declaration of | |||
that we'll return to in a moment. With this approach, one can write functions such as: | |||
|
|||
```jldoctest containers2 | |||
julia> function myfunc{T<:Integer, A<:AbstractArray}(c::MyContainer{T,A}) | |||
julia> function myfunc(c::MyContainer{T,A}) where {T<:Integer, A<:AbstractArray} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not do MyContainer{<:Integer, <:AbstractArray}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I'll go with that. Thanks!
53a935b
to
64fa673
Compare
In the same vein as #21456, my goal is to make the stylistic conventions in the manual consistent, e.g. by migrating to
where
andstruct
syntax, using the standard 4 spaces for indentation, etc.CI skipped, remove from commit message when merging.