-
-
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
Add docs for SubstitutionString #27134
Changes from all commits
03f2407
b417264
65fd283
65b7238
ec88328
dedca7d
a0766ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,6 +84,7 @@ export | |
StridedVector, | ||
SubArray, | ||
SubString, | ||
SubstitutionString, | ||
Timer, | ||
UnitRange, | ||
Val, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,8 @@ Base.codeunit | |
Base.codeunits | ||
Base.ascii | ||
Base.@r_str | ||
Base.SubstitutionString | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIK we only list exported objects here, yet There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There seem to be a few exceptions to that (eg. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
Base.@s_str | ||
Base.@raw_str | ||
Base.Docs.@html_str | ||
Base.Docs.@text_str | ||
|
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.
Need to escape all the backslashes?
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.
I've corrected that and fixed some doc reference errors (thanks to help from @fredrikekre), committed that to the PR.
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.
Actually you need single backslashes; the examples don't work with double ones. That's because non-standard string literal macros are passed the raw string, and escapes are not interpreted.
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.
The example is inside a julia string and escapes are interpreted.
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.
My bad, I chose the wrong thread. My comment applies to uses of
s"..."
below.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.
Where? Everything here is inside a normal julia string.
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 example no longer works due to double slashes: https://github.com/JuliaLang/julia/pull/27134/files#diff-7422507bb03a8ecee35360dc9380b9caR261
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.
But it won't have double slashes in the rendered documentation? Again, because this is inside a normal julia string.
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.
Ahah, got it, that's tricky. Indeed that's a special string inside a standard (doc)string...